Last active
November 20, 2016 21:28
-
-
Save charud/b39bfa775e56161d8ee2 to your computer and use it in GitHub Desktop.
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
# Autojump | |
[ -f /usr/local/share/autojump/autojump.fish ]; and . /usr/local/share/autojump/autojump.fish ] | |
# [ -f /usr/local/Cellar/autojump/22.2.4/share/autojump/autojump.fish ]; and . /usr/local/Cellar/autojump/22.2.4/share/autojump/autojump.fish ] | |
# Git Branch in terminal | |
set fish_git_dirty_color red | |
set fish_git_not_dirty_color green | |
function parse_git_branch | |
set -l branch (git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/\1/') | |
#set -l git_diff (git diff) | |
echo (set_color $fish_git_not_dirty_color)$branch(set_color normal) | |
end | |
function fish_prompt | |
set -l git_dir (git rev-parse --git-dir 2> /dev/null) | |
if test -n "$git_dir" | |
# printf '%s@%s %s%s%s:%s> ' (whoami) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) (parse_git_branch) | |
printf '%s %s%s%s:%s> ' (whoami) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) (parse_git_branch) | |
else | |
# printf '%s@%s %s%s%s> ' (whoami) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) | |
printf '%s %s%s%s> ' (whoami) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) | |
end | |
end | |
### | |
export NVM_DIR="$HOME/.nvm" | |
bass source "/usr/local/opt/nvm/nvm.sh" | |
function nvm | |
# bass source ~/.nvm/nvm.sh ';' nvm $argv | |
bass source /usr/local/opt/nvm/nvm.sh ';' nvm $argv | |
end | |
# bass source ~/.nvm/nvm.sh | |
# fish_vi_mode | |
function my_vi_bindings | |
fish_vi_key_bindings | |
bind -M insert \ce accept-autosuggestion | |
end | |
set -g fish_key_bindings my_vi_bindings | |
# bass export NVM_DIR="/Users/cr/.nvm" | |
# bass source ~/.nvm/nvm.sh | |
# run tmux in 256 color mode | |
# test $TERM != "screen"; and exec tmux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment