Skip to content

Instantly share code, notes, and snippets.

@martinklepsch
Created June 21, 2012 11:18
Show Gist options
  • Save martinklepsch/2965192 to your computer and use it in GitHub Desktop.
Save martinklepsch/2965192 to your computer and use it in GitHub Desktop.
# Useful aliases {{{
alias c 'clear'
alias hl 'less -R'
alias paththis 'set PATH (pwd) $PATH'
alias ef 'vim ~/.config/fish/config.fish'
# }}}
# Environment variables {{{
set PATH "$HOME/.bin" $PATH
set -g -x fish_greeting ''
set -g -x EDITOR vim
set -g -x COMMAND_MODE unix2003
set -g -x RUBYOPT rubygems
# TODO MKL Actual thing here
# set -g -x CLASSPATH "$CLASSPATH:/usr/local/Cellar/clojure-contrib/1.2.0/clojure-contrib.jar"
# }}}
# Prompt {{{
set normal (set_color normal)
set magenta (set_color magenta)
set yellow (set_color yellow)
set green (set_color green)
set gray (set_color -o black)
if not set -q __git_cb
set __git_cb ":"(set_color brown)(git branch ^/dev/null | grep \* | sed 's/* //')(set_color normal)""
end
function fish_prompt
set last_status $status
echo
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
printf '%s' $__git_cb
echo
set_color normal
end
# }}}
# Directories {{{
alias .. 'cd ..'
alias ... 'cd ../..'
alias .... 'cd ../../..'
alias ..... 'cd ../../../..'
alias md 'mkdir -p'
alias l1 'tree --dirsfirst -ChFL 1'
alias l2 'tree --dirsfirst -ChFL 2'
alias l3 'tree --dirsfirst -ChFL 3'
alias ll1 'tree --dirsfirst -ChFupDaL 1'
alias ll2 'tree --dirsfirst -ChFupDaL 2'
alias ll3 'tree --dirsfirst -ChFupDaL 3'
alias l 'l1'
alias ll 'll1'
# }}}
# Local Settings {{{
if test -s $HOME/.config/fish/local.fish
source $HOME/.config/fish/local.fish
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment