Skip to content

Instantly share code, notes, and snippets.

Last active November 12, 2015 18:03
What would you like to do?
Fish shell port of za
function za
## Fish shell port of za
## What The Fish? :
## To use za as a Fish function, just copy paste the script and enter
## Then run func_save za
## Now you can use za on your Fish <"><
if [ -z $argv[1] ]
set za_mark 1
set za_mark $argv[1]
set za_dir $PWD
# When in home, do nothing
[ $za_dir = $HOME ]; and return
while [ $za_mark -gt 0 -a $za_dir != $HOME ]
set za_dir (dirname $za_dir)
set za_mark (math $za_mark - 1)
cd $za_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment