Re: Specify completion without name

2012-01-11 Thread Chet Ramey
On 1/11/12 3:03 PM, Linda Walsh wrote: > Like... compat40 mentions it changes behavior, about interrupting a command > list, yet try to find out what that behavior is, or what compat40 would > change it 'to'? Thanks, I added that to the description. It means that bash versions later than 4.0 in

Re: Specify completion without name

2012-01-11 Thread Linda Walsh
Clark J. Wang wrote: On Fri, Jan 6, 2012 at 00:33, Peng Yu wrote: But beware to clearly document these by giving working EXAMPLE code which include these three commands (not just text explanation without working code, by "working code" I mean code snippet is discouraged, a complete completio

Re: Specify completion without name

2012-01-05 Thread Peng Yu
> The bash man page already has ~70 pages manual. I don't like it to grow to > ~700 pages (like the ABS Guide) with all the working examples you expected. > :) Do you use search at all? :) If you use search, it doesn't really matter if is a 700 page manual. -- Regards, Peng

Re: Specify completion without name

2012-01-05 Thread Clark J. Wang
On Fri, Jan 6, 2012 at 00:33, Peng Yu wrote: > > I would envision that such a completion function would assemble its list > > of possible completions by using your read-from-a-file mechanism and > > augment the list using compgen -a/compgen -b/compgen -A function. It > > would probably also want

Re: Specify completion without name

2012-01-05 Thread Peng Yu
> I would envision that such a completion function would assemble its list > of possible completions by using your read-from-a-file mechanism and > augment the list using compgen -a/compgen -b/compgen -A function.  It > would probably also want to handle glob patterns and expand them to > potential

Re: Specify completion without name

2012-01-05 Thread Chet Ramey
On 1/5/12 10:21 AM, Peng Yu wrote: >> Presumably you would also include aliases, shell builtins, and functions >> in this file. > > Yes. I just want to replace executables in PATH by the result from my > custom function. I think that aliases, builtins, and functions are all > in the memory of bash

Re: Specify completion without name

2012-01-05 Thread Peng Yu
> Presumably you would also include aliases, shell builtins, and functions > in this file. Yes. I just want to replace executables in PATH by the result from my custom function. I think that aliases, builtins, and functions are all in the memory of bash already, so it doesn't take extra time to se

Re: Specify completion without name

2012-01-05 Thread Chet Ramey
On 1/4/12 10:37 PM, Peng Yu wrote: >> empty lines. There is no programmable completion mechanism to complete >> on non-empty command names. > > I'm wondering if it is worthwhile to add such a feature. I have run > into the problem that it is very slow to command complete an > incomplete command e

Re: Specify completion without name

2012-01-04 Thread Peng Yu
> empty lines. There is no programmable completion mechanism to complete > on non-empty command names. I'm wondering if it is worthwhile to add such a feature. I have run into the problem that it is very slow to command complete an incomplete command especially when other programs are accessing t

Re: Specify completion without name

2012-01-04 Thread Chet Ramey
On 1/4/12 8:54 PM, Peng Yu wrote: > Hi, > > I want to customize the command completion for completing executables, > I want to search in a file (which includes all the executables in > PATH) rather than the default PATH variable. But I don't see how to do > so, as the following help indicates that

Specify completion without name

2012-01-04 Thread Peng Yu
Hi, I want to customize the command completion for completing executables, I want to search in a file (which includes all the executables in PATH) rather than the default PATH variable. But I don't see how to do so, as the following help indicates that it can only configure how to complete the arg