Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: alias with a parameter



Grant Taylor wrote on Thu, 08 Apr 2021 01:06 +00:00:
>     pd () {
>     	[ $# -eq 1 ] && pushd "${1}"
>     	[ $# -eq 0 ] && popd
>     }

This will return non-zero when pushd succeeds.

setopt PRINT_EXIT_VALUE

☺





Messages sorted by: Reverse Date, Date, Thread, Author