fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
9870faa8b
master
1function fish_title 2# If we're connected via ssh, we print the hostname. 3set -l ssh 4set -q SSH_TTY 5and set ssh"[" ( prompt_hostname | string sub -l10 | string collect) "]" 6# An override for the current command is passed as the first parameter. 7# This is used by `fg` to show the true process name, among others. 8if set -q argv[ 1 ] 9echo --$ssh ( string sub -l20 --$argv [ 1 ]) ( prompt_pwd -d1 -D1 ) 10else 11# Don't print "fish" because it's redundant 12set -l command( status current-command) 13if test " $command " = fish 14set command 15end 16echo --$ssh ( string sub -l20 --$command ) ( prompt_pwd -d1 -D1 ) 17end 18end