[Bash-completion-devel] [PATCH] check if ruptime is installed

Ville Skyttä ville.skytta at iki.fi
Fri Jun 12 08:23:02 UTC 2015


On Fri, Jun 12, 2015 at 4:47 AM, isabella parakiss <izaberina at gmail.com> wrote:

> In line 1588 you use ruptime 2>/dev/null.  I have no ruptime but I do use a
> command_not_found_handle. Please apply the attached patch.

Using an optional command before checking if it exists is a very
commonly used pattern in bash-completion, and I don't think we want to
address their occurrences one at a time. TBH, I'm pretty sure if we'd
rather not address that stuff at all. I don't use
command_not_found_handle stuff myself so this is just untested
guesswork, but maybe you could modify your function to check if a
completion function is being run and exiting early if it is, maybe by
checking if $COMP_LINE is empty or not?



More information about the Bash-completion-devel mailing list