Davide Brini wrote:

foo() {  # hit enter here
# hit tab here
Display all 112 possibilities? (y or n)

The latter only attemps completion from names in the current directory.
---
        Right.   That was my issue.

My understanding is it shouldn't try to perform completion on an empty
line.  Period.

Consider at the command line:
<tab>
it doesn't display the local filenames

(assuming no_command_completion is set)...


The POSIX reference was to a previous note I posted ... were I wanted to
know why
return -1 threw an error, but you could work around it with
(exit -1);return; People cited posix, but I asked for return to be consistent with 'exit', as exit (as it currently functions) is consistent with most other languages (i.e. they
define the value as a short int, but it is still truncated to 8-bits).
Having exit & return in bash behave similarly to other langs can only help in shell programming.

If 'posix-only', (or whtaever the option is) is set, then probably both (exit and return)
should 'throw' errors -- 'value out of range' (not invalid option

Anyway...command completion!...uh....shouldn't be trying to complete
things from the current dir. That's the whole point of no_empty_cmd_completion, no?


Reply via email to