Skip to content

Instantly share code, notes, and snippets.

@dmouse
Last active December 17, 2015 04:19
Show Gist options
  • Select an option

  • Save dmouse/5549835 to your computer and use it in GitHub Desktop.

Select an option

Save dmouse/5549835 to your computer and use it in GitHub Desktop.
fish-shell config file
# File ~/.config/fish/config.fish
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function fish_prompt
# Alias
alias grep="grep -n --color -T"
# Prompt
set_color red --bold
printf '%s' (whoami)
set_color white
printf ' in '
set_color green
printf (prompt_pwd)
if [ (_git_branch_name) ]
set_color blue
echo -n ' ['(_git_branch_name)']'
end
set_color white
printf ' > '
end
# bins in ruby gems
set PATH ~/.gem/ruby/gems/*/bin $PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment