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: bash 3.2 vs 3.0

2012-01-05 Thread Chet Ramey
On 1/5/12 5:12 AM, Dave wrote: > Hi all, > > Recently upgraded to 3.2 and noticed some differences in a lot of my > scripts, consider the following example: You might have a tough time getting help on this. Bash-3.2 was released over five years ago; bash-3.0 two years before that. I point peopl

Re: bash 3.2 vs 3.0

2012-01-05 Thread Chris F.A. Johnson
On Thu, 5 Jan 2012, Dave wrote: Hi all, Recently upgraded to 3.2 and noticed some differences in a lot of my scripts, consider the following example: ... Could anyone point me in correct direction on this one ? Upgrade to 4.2; you are years behind the times! -- Chris F.A. Johnson, <

bash 3.2 vs 3.0

2012-01-05 Thread Dave
Hi all, Recently upgraded to 3.2 and noticed some differences in a lot of my scripts, consider the following example: #!/bin/bash trap error_reporter ERR set -o errexit set -o errtrace set -o nounset set -o pipefail logf_error=/dev/null function _exit { local -ri retval="${1:-$?}" exit ${re

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

Issue with errtrace

2012-01-05 Thread Dave
Hi all, Recently upgraded to 3.2 and noticed some differences in a lot of my scripts, consider the following example: #!/bin/bash trap error_reporter ERR set -o errexit set -o errtrace set -o nounset set -o pipefail logf_error=/dev/null function _exit { local -ri retval="${1:-$?}" exit ${re

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: bug in force_interactive handling

2012-01-05 Thread Stas Sergeev
05.01.2012 06:50, Chet Ramey wrote: So you'd like the shell to act on a signal without `consulting' the foreground job? For only the dedicated traps. For example: trap -b /bin/true USR1 -b here would mean that the foreground job, if any, is to be moved to the background before executing the com