fish
Managing fish plugins
Miscellaneous tips
# Useful directories set -x Dropbox $HOME/Dropbox set -x Projects $Dropbox/Projectsrg '__main__' $Projects
Useful functions
# Mnemonic - Run in Directory function rd --description "run given commands in directory without changing current directory" set dir $argv[1] set --erase argv[1] if test -n "$dir" # Run in a sub shell so that we do not change directory stack fish -c " pushd $dir eval $argv " end end# From - http://unix.stackexchange.com/questions/125385/combined-mkdir-and-cd function mkcd --argument-names 'path' if test -n "$path" mkdir -p -- "$path"; and cd "$path" end endfunction container-id set search $argv[1] set --erase argv[1] if test -n "$search" docker ps | grep "$search" | cut -f1 -d' ' end end
Last updated