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: Davide Brini
Subject: Re: Bug, or someone wanna explain to me why this is a POSIX feature?
Date: Mon, 8 Aug 2011 21:14:50 +0200
User-agent:

On Mon, 08 Aug 2011 12:07:21 -0700, Linda Walsh <bash@tlinx.org> wrote:

> however, Can you explain the purpose of the "shopt option 
> 'no_empty_cmd_completion'
> and if you can do that, can you explain why I shouldn't use tab as an
> indent char on an empty line...?

Short answer: if you do

foo() {
>  # hit tab here
 
(the ">" is the prompt bash gives you if you hit enter), that's NOT an
empty line as far as bash is concerned, so the option
no_empty_cmd_completion does not come into play. In fact, you could do the
same thing with

foo() { # hit tab here

and I'm sure you wouldn't consider that an empty line.

Note that it's not related specifically to declaring a function: try for
example

ls /tmp &&   # hit enter here
>  # hit tab here, you get the completions

And as already stated, POSIX has nothing to do with all this.

-- 
D.



reply via email to

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