variables not TAB expanded except in first position

2017-11-05 Thread 積丹尼 Dan Jacobson
$ $BRO #makes $BROWSER. Good!
$ xargs $BRO #just beeps. Bad.
Yes I have bash-completions installed but am not sure what is to blame.



Re: variables not TAB expanded except in first position

2017-11-05 Thread Chet Ramey
On 11/5/17 10:37 AM, 積丹尼 Dan Jacobson wrote:
> $ $BRO #makes $BROWSER. Good!
> $ xargs $BRO #just beeps. Bad.
> Yes I have bash-completions installed but am not sure what is to blame.

It's bash-completion. You can easily check this yourself by temporarily
disabling programmable completion.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



help complete: mention remove all AND restore all

2017-11-05 Thread 積丹尼 Dan Jacobson
$ help complete

  -rremove a completion specification for each NAME, or, if no
NAMEs are supplied, all completion specifications

Add
To later restore them do ...

as one often wants to remove them all, try something, and then put them
all back.

I am not asking for help. I am saying $ help complete should mention
more things.



Re: variables not TAB expanded except in first position

2017-11-05 Thread 積丹尼 Dan Jacobson
OK submitted https://github.com/scop/bash-completion/issues/173



Re: help complete: mention remove all AND restore all

2017-11-05 Thread Pierre Gaston
On Sun, Nov 5, 2017 at 6:58 PM, 積丹尼 Dan Jacobson 
wrote:

> $ help complete
>
>   -rremove a completion specification for each NAME, or, if no
> NAMEs are supplied, all completion specifications
>
> Add
> To later restore them do ...
>
> as one often wants to remove them all, try something, and then put them
> all back.
>
> I am not asking for help. I am saying $ help complete should mention
> more things.
>
>
There is no magic way to restore them, typically they are loaded by some
system wide rc file but the way this is implemented differs, and of course
users are free to do what they want.
I guess a straightforward way would be to "exec bash"


Re: help complete: mention remove all AND restore all

2017-11-05 Thread 積丹尼 Dan Jacobson
PG> There is no magic way to restore them

Actually it also says
  -pprint existing completion specifications in a reusable format
So maybe it should say do
   I=$(completion -p); completion -r; : your tests; $I
but I didn't test it.



Re: help complete: mention remove all AND restore all

2017-11-05 Thread Chet Ramey
On 11/5/17 11:58 AM, 積丹尼 Dan Jacobson wrote:
> $ help complete
> 
>   -r  remove a completion specification for each NAME, or, if no
>   NAMEs are supplied, all completion specifications
> 
> Add
> To later restore them do ...

There is no standard way to restore completions; different systems load
them using different mechanisms.

> as one often wants to remove them all, try something, and then put them
> all back.

You're overthinking it. If you want to see if something works without
programmable completion, temporarily turn off programmable completion
using `shopt -u progcomp'.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: help complete: mention remove all AND restore all

2017-11-05 Thread 積丹尼 Dan Jacobson
OK, please on
$ help complete
at "-r" please mention
"To instead toggle on and off PROGRAMMABLE completion, use shopt -[su] 
progcomp."

Reason: there is very little chance the user could Google the right
answer out of the forest of answers out there.

(P.S., I am not sure if PROGRAMMABLE should be in caps, to distinguish
it from all the other kinds of completion.)



help shopt: mention what happens if only optnames are given

2017-11-05 Thread 積丹尼 Dan Jacobson
$ help shopt
shopt: shopt [-pqsu] [-o] [optname ...]
Set and unset shell options.

Change the setting of each shell option OPTNAME.  Without any option
arguments, list all shell options with an indication of whether or not each
is set.

Add:
If just optnames are given, list each's status.



Re: help shopt: mention what happens if only optnames are given

2017-11-05 Thread Dennis Williamson
On Nov 5, 2017 7:05 PM, "積丹尼 Dan Jacobson"  wrote:

$ help shopt
shopt: shopt [-pqsu] [-o] [optname ...]
Set and unset shell options.

Change the setting of each shell option OPTNAME.  Without any option
arguments, list all shell options with an indication of whether or not
each
is set.

Add:
If just optnames are given, list each's status.


It already says that. You quoted it.


Re: help shopt: mention what happens if only optnames are given

2017-11-05 Thread 積丹尼 Dan Jacobson
OK it mentions "Without any option arguments". Then it also needs to
mention "Without any argument at all".



Re: help complete: mention remove all AND restore all

2017-11-05 Thread Eduardo Bustamante
On Sun, Nov 5, 2017 at 7:01 PM, 積丹尼 Dan Jacobson  wrote:
> OK, please on
> $ help complete
> at "-r" please mention
> "To instead toggle on and off PROGRAMMABLE completion, use shopt -[su] 
> progcomp."
>
> Reason: there is very little chance the user could Google the right
> answer out of the forest of answers out there.

I googled "disable programmable completion bash" and the first result
is: 
,
which lists the shopt to disable it. The second result also mentions
it: 
.

The manual is not supposed to have direct answers to all the possible
questions the user might have. That would just make the manual larger
(it is huge already) and unreadable.