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

Re: How can I avoid completion using chkconfig on RHEL10?



On Wed, Feb 25, 2026 at 12:04 AM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> I'm not keen on wrapping every use of an external command in
> completion with checks for the command, partly because of the
> inherent race condition. For software in general, it is usually
> better to just try and handle the errors as they occur than to
> check first: chkconfig --list >/dev/null 2>&1 should fail silently.

I always check for the existence of commands in public zsh code
because command_not_found_handler can be very slow. On Debian, it can
take over a second.

Roman




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