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

Bart Schaefer <[email protected]> Wed, 25 Feb 2026 09:22:47 -0800
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <CAH+w=7YeCPvNwYAF+uM8a==hpNPVJ_nKgJopNmTTR_YTxtYM2Q@mail.gmail.com>
On Tue, Feb 24, 2026 at 3:03 PM Oliver Kiddle <[email protected]> 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.