Skip to content

Instantly share code, notes, and snippets.

@dethbunny
Last active August 29, 2015 13:56
Show Gist options
  • Save dethbunny/9202757 to your computer and use it in GitHub Desktop.
Save dethbunny/9202757 to your computer and use it in GitHub Desktop.
$ cat .config/fish/functions/fish_prompt.fish
function fish_prompt --description 'Write out the prompt'
if test -z $WINDOW
printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
else
printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (hostname|cut -d . -f 1) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
end
# update the cwd to facilitate restore
# https://github.com/fish-shell/fish-shell/issues/87
printf '\033]7;%s\07' (echo file://(hostname)$PWD |sed -e 's/ /%20/g')
end
@dethbunny
Copy link
Author

the -s flag to hostname was preventing proper proxy icons from working with local shells, so I removed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment