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

Re: Idiom for booleans



On Aug 12, 10:26pm, Micah Elliott wrote:
} Subject: Re: Idiom for booleans
}
} > On Aug 12,  5:24pm, Micah Elliott wrote:
} > }
} > }   % (( 0 ))
} > }   ((: command not found
} 
} > This has to be something in your configuration.  Try it with zsh -f ?
} 
}   . /etc/zsh_command_not_found
} 
} That's a pretty handy utility (that I would expect to be popular), but
} for now I'm going to live without it. I see it's a problem on the last
} few Ubuntu releases, and I can't believe other people aren't seeing
} the problem.

I've had a Ubuntu laptop for a couple of years now and never noticed
this utility (not that I'd have used it if I had) so it's not all that
surprising to me that it isn't a widespread problem.

Ironically, the very first line of the precmd function defined by
/etc/zsh_command_not_found begins with

   (($?)) && ...

Obviously this implementation predates zsh introducing its own hook for
command-not-found.  It could have been done correctly, though, by the
simple expedient of

   (($? == 127)) && ...



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