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

Re: zmv exits from function




On 2024-01-02 03:50, Peter Stephenson wrote:
On 30/12/2023 20:38 GMT Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
Arguably zmv could use null_glob.  Thoughts from -workers?
I guess the right thing to do regardless of option is that it should
fail gracefully just by returning status 1 --- so not propagating the
error to the caller.

That's just was I was trying to say :-)

There's a lot to be said for graceful failure.  If one wishes to crash the calling function one should  of course have that option, but why make it the default?  There's a sorta 'invisible return' there and the 'always' thing counteracts it, but it all seems so unnecessary.  No invisible code, please.

BTW, just to whine, 'always' is sure hard to find in the help. One obviously can't just search for that word, and it doesn't show up in the list of reserved words neither.










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