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

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



On Tue, Feb 24, 2026 at 3:03 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> 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.

Really?  That would be a bug in itself, command_not_found_handler is
supposed to run after forking.

% command_not_found_handler() { print OOPS }
% thisisnotacommand
OOPS
% thisisnotacommand > /dev/null 2>&1
% echo $?
0
% command_not_found_handler() { print OOPS; return 127 }
% thisisnotacommand > /dev/null 2>&1
% echo $?
127

So the actual problem could be that the command_not_found_handler
function is returning zero, making it appear to the "if" that
chckconfig works when in fact it does not.

> Can or should it be disabled for the completion system? What
> about for all functions?

It probably should be disabled in completion.  No opinion on other contexts.




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