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

Re: [PATCH] POSIXBUILTINS: quieten 'unset -f nonexistentfunc'



Op 11-10-17 om 19:44 schreef Martijn Dekker:
> Doing 'unset -f' on an unset function outputs an error message and
> causes an unsuccessful exit status. All other shells quietly ignore it.
> POSIX specifies for 'unset' that "Unsetting a variable or function that
> was not previously set shall not be considered an error [...]".
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_29_03
> 
> If I have figured this out correctly, then the attached patch causes
> 'unset -f nonexistent_function' to be quiet and return status 0 if
> POSIXBUILTINS is active, without changing the behaviour of 'unfunction'
> and 'unhash -f'.

Was this overlooked, or rejected?

Thanks,

- M.



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