Skip to content

Instantly share code, notes, and snippets.

@dmouse
Last active August 29, 2015 14:15
Show Gist options
  • Save dmouse/e951c4308167d35796ca to your computer and use it in GitHub Desktop.
Save dmouse/e951c4308167d35796ca to your computer and use it in GitHub Desktop.
My config to fish shell
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function fish_prompt
set_color green --bold
printf '%s [at] ' (whoami)
set_color blue
printf '%s ' (hostname)
#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
# bins in composer
set PATH ~/.composer/vendor/bin $PATH
complete -p sudo
function fuck
eval command sudo $history[1] $argv;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment