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

Re: alias with a parameter



On 4/7/21 7:25 PM, Daniel Shahaf wrote:
This will return non-zero when pushd succeeds.

You are correct.

   pd () {
   	[ $# -eq 1 ] && pushd "${1}" && return 0
   	[ $# -eq 0 ] && popd
   }

setopt PRINT_EXIT_VALUE

I should have seen the bug you report as I have $? in the RPROMPT conditionally when it's > 0. So ... one would think I would have seen that.



--
Grant. . . .
unix || die

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



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