fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerRemove workarounds for Emacs ansi-term9870faa8b

master
698 B18 linesraw
1function fish_title
2    # If we're connected via ssh, we print the hostname.
3    set -l ssh
4    set -q SSH_TTY
5    and set ssh "["(prompt_hostname | string sub -l 10 | 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.
8    if set -q argv[1]
9        echo -- $ssh (string sub -l 20 -- $argv[1]) (prompt_pwd -d 1 -D 1)
10    else
11        # Don't print "fish" because it's redundant
12        set -l command (status current-command)
13        if test "$command" = fish
14            set command
15        end
16        echo -- $ssh (string sub -l 20 -- $command) (prompt_pwd -d 1 -D 1)
17    end
18end