Created
March 16, 2013 17:36
-
-
Save mattjj/5177423 to your computer and use it in GitHub Desktop.
in ~/.config/fish/config.fish and ~/.config/fish/functions/fish_prompt.fish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set PATH "$HOME"/bin /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/\ | |
/opt/local/bin /opt/local/sbin $PATH | |
set CDPATH . "$HOME" $CDPATH | |
set fish_greeting "" | |
function fish_user_key_bindings | |
bind \e\[1\;9A 'history-token-search-backward' | |
end | |
alias v=vim | |
alias vv='vim -u NONE' | |
alias pl='ipython --pylab' | |
alias top=htop | |
alias cloc='cloc --exclude-dir=.git' | |
alias scheme='rlwrap -r -c -b" " -f "$HOME"/.scheme_completion.txt scheme' | |
alias gb='git branch' | |
alias gco='git checkout' | |
alias gca='git commit --all' | |
alias pcat='pygmentize -f terminal256 -O style=native -g' | |
alias less='less -r' | |
# see https://github.com/fish-shell/fish-shell/issues/393 | |
function make_completion --argument alias command | |
complete -c $alias -xa "( | |
set -l cmd (commandline -pc | sed -e 's/^ *\S\+ *//' ); | |
complete -C\"$command \$cmd\"; | |
)" | |
end | |
make_completion gb 'git branch' | |
make_completion gco 'git checkout' | |
make_completion gca 'git commit --all' | |
make_completion pcat 'cat' | |
set PYTHONPATH "~/Library/Python:$PYTHONPATH" | |
set __fish_git_prompt_showdirtystate 'yes' | |
set __fish_git_prompt_color_branch magenta | |
set __fish_git_prompt_char_dirtystate '!' | |
set __fish_git_prompt_char_stagedstate '→' | |
set __fish_git_prompt_char_stashstate '↩' | |
set __fish_git_prompt_char_upstream_ahead '↑' | |
set __fish_git_prompt_char_upstream_behind '↓' | |
function j | |
cd (command autojump $argv) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt | |
set_color blue | |
printf '%s' (whoami) | |
set_color normal | |
printf ' at ' | |
set_color yellow | |
printf '%s' (hostname|cut -d . -f 1) | |
set_color normal | |
printf ' in ' | |
set_color $fish_color_cwd | |
printf '%s' (prompt_pwd) | |
set_color normal | |
__fish_git_prompt " on %s" | |
echo | |
printf '○ ' | |
set_color normal | |
autojump -a $PWD > /dev/null & | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment