Re: How can I avoid completion using chkconfig on RHEL10?
Oliver Kiddle <[email protected]> Wed, 25 Feb 2026 00:03:32 +0100
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]._C81> |
Bart Schaefer wrote: > The _services completer hasn't been updated since 2012, so it probably > is due for some maintenance. I can't really see much wrong with _services. Perhaps the chkconfig branch could be removed. The main problem here is that command_not_found_handler() is apparently run for the chkconfig command and produces output regardless of the /dev/null redirections. 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've never as such made use of a command_not_found_handler. Presumably it is intentional that it is invoked for commands that are run indirectly? Can or should it be disabled for the completion system? What about for all functions? Oliver