[Bash-completion-devel] Completion function return values?

Ville Skyttä ville.skytta at iki.fi
Sat Apr 9 11:16:10 UTC 2011


One trivial thing that I find mildly annoying and would like to clean up
if there's no actual need for it:

Is the return value from completion functions significant in any way
when it gets returned to bash?  Many functions end with "return 0", and
many without a "return" at all which means the return value of the last
executed command gets returned, and I don't think there's much
consistency at all at the moment.  I suppose it isn't significant to bash.

I'd like to remove all unneeded returns, and possibly replace "return
0"s with "return" to make it clearer we don't care about the value.
(The cases where _we_ care about the return value wouldn't change.)



More information about the Bash-completion-devel mailing list