Skip to content

Instantly share code, notes, and snippets.

@eliezerdt
Last active October 4, 2017 21:24
Show Gist options
  • Select an option

  • Save eliezerdt/74eb0c9a1c5614d46ea3 to your computer and use it in GitHub Desktop.

Select an option

Save eliezerdt/74eb0c9a1c5614d46ea3 to your computer and use it in GitHub Desktop.
~/.config/fish/config.fish
function fish_prompt
set_color $fish_color_cwd
# echo -n (prompt_pwd)
if test "$PWD" != "$HOME"
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|")
else
echo '~'
end
set_color normal
echo
if not set -q __git_cb
set __git_cb ":"(set_color brown)(git branch ^/dev/null | grep \* | sed 's/* //')(set_color normal)""
end
echo -n $__git_cb '> '
end
function fish_right_prompt -d "Write out the right prompt"
set_color yellow
date
set_color normal
end
@elidiaz-cari
Copy link

~/.config/fish/config.fish

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