bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug, or someone wanna explain to me why this is a POSIX feature?


From: Linda Walsh
Subject: Re: Bug, or someone wanna explain to me why this is a POSIX feature?
Date: Mon, 08 Aug 2011 13:49:31 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666



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

[Prev in Thread] Current Thread [Next in Thread]