fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerPrepare to not localize private function descriptionsd835c5252

master
455 B18 linesraw
1# localization: tier1
2function popd --description "Pop directory from the stack and cd to it"
3    if count $argv >/dev/null
4        switch $argv[1]
5            case -h --h --he --hel --help
6                __fish_print_help popd
7                return 0
8        end
9    end
10
11    if set -q dirstack[1]
12        cd $dirstack[1]
13        set -e dirstack[1]
14    else
15        printf (_ "%s: Directory stack is empty…\n") popd 1>&2
16        return 1
17    end
18end