Re: wrong lineno inside trap?

2009-01-14 Thread peter360
Chet Ramey wrote: > > > Bash-4.0 should behave better in this area, but quoted strings will > always cause unpredictable values for $LINENO. > > Chet > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > > Chet Ramey, ITS, CWRUc...@case.edu > http://cnswww.cns.cwru.edu/

Re: [bash-testers] Re: case modification operators misbehaviour?

2009-01-14 Thread Chris F.A. Johnson
On 2009-01-15, Jan Schampera wrote: ... > I have another one, maybe my misinterpretion or an unclean documentation: > > $ TEXT="Test" > $ echo ${TEXT^s} > Test > > I expected "TeSt", since the pattern is "s", and the 3rd letter in > "Test" matches that, and should be changed. Interesting that it wo

Re: [bash-testers] Re: case modification operators misbehaviour?

2009-01-14 Thread Jan Schampera
Chet Ramey wrote: >> The case modification operators (for parameter expansion) seem to be >> puzzled. >> >> Two things I don't understand: >> - it seems to work word-wise (might be due to my misinterpretion of the >> default pattern) > > It does work word-by-word, like the emacs-mode editing comm

Re: dabbrev-expand behavior

2009-01-14 Thread Dan Nicolaescu
Chet Ramey writes: > Dan Nicolaescu wrote: > > Hi, > > > > Thanks for implementing dabbrev-expand in bash-4.0! > > > > Unfortunately the behavior is not consistent with what dabbrev-expand > > does in Emacs (and tcsh), so it will be quite confusing for users to > > use. > >

Re: case modification operators misbehaviour?

2009-01-14 Thread Chet Ramey
Jan Schampera wrote: > (I used the bashbug command to provide config information) > > Configuration Information [Automatically generated, do not change]: > Machine: i486 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' > -DCONF_OSTYPE='linux-gnu' -DCON

Re: dabbrev-expand behavior

2009-01-14 Thread Chet Ramey
Dan Nicolaescu wrote: > Hi, > > Thanks for implementing dabbrev-expand in bash-4.0! > > Unfortunately the behavior is not consistent with what dabbrev-expand > does in Emacs (and tcsh), so it will be quite confusing for users to > use. Since the dabbrev-expand implementation combines existing me

Re: truncating the path in the bash prompt?

2009-01-14 Thread Paul Jarc
Matthew Woehlke wrote: > Actually, a feature that would be REALLY helpful is a way to specify > certain directory strings that should be abbreviated. PS1='...$(mypath)...' mypath() { case $PWD/ in /usr/local/src/kde/svn/trunk/*) printf %s "${PWD/#\/usr\/local\/src\/kde\/svn\/trunk/\$s

Re: coprocess suggestions

2009-01-14 Thread Andreas Schwab
Chet Ramey writes: > The grammar will not interpret it that way. The token following the > NAME after the `coproc' will be parsed as a reserved word if it meets > the criteria for a reserved word -- that is, this is a place where > reserved words will be recognized. That should be documented si

Re: truncating the path in the bash prompt?

2009-01-14 Thread Chet Ramey
Matthew Woehlke wrote: > Actually, a feature that would be REALLY helpful is a way to specify > certain directory strings that should be abbreviated. For example, I > build KDE from sources, with source in /usr/local/src/kde/svn/trunk and > build objects in /var/local/build/kde/svn/trunk. It would

Re: coprocess suggestions

2009-01-14 Thread Chet Ramey
Andreas Schwab wrote: > Chet Ramey writes: > >> Pierre Gaston wrote: >>> I have a couple of suggestions about coprocesses. >>> If I understood correctly how coproc works, I think that >>> instead of : >>> coproc [NAME] command [redirections] >>> >>> the documentation would be a little clearer wit

Re: truncating the path in the bash prompt?

2009-01-14 Thread Matthew Woehlke
Dan Nicolaescu wrote: Dan Nicolaescu writes: > In tcsh %c can be used to only show the last few directory names in a > path (also see the ellipsis variable). > > For example for this directory: > > /lib/modules/2.6.21-1.3194.fc7/kernel/drivers/char/hw_random/ > > the promp

Re: coprocess suggestions

2009-01-14 Thread Andreas Schwab
Chet Ramey writes: > Pierre Gaston wrote: >> I have a couple of suggestions about coprocesses. >> If I understood correctly how coproc works, I think that >> instead of : >> coproc [NAME] command [redirections] >> >> the documentation would be a little clearer with something like: >> >> coproc

dabbrev-expand behavior

2009-01-14 Thread Dan Nicolaescu
Hi, Thanks for implementing dabbrev-expand in bash-4.0! Unfortunately the behavior is not consistent with what dabbrev-expand does in Emacs (and tcsh), so it will be quite confusing for users to use. Doing # bind dabbrev-expand to it's canonical key: $ bind '"\M-/":dabbrev-expand' # Now run a f

Re: only one coprocess?

2009-01-14 Thread Chet Ramey
Pierre Gaston wrote: > in the manpage: > BUGS > There may be only one active coprocess at a time. > > Is this still valid? > it seems that bash issues a warning, but let you use more than one coprocess. Bash allows it, but you will find that the shell more or less ignores the `previous' cop

Re: run-fg-editor for bash?

2009-01-14 Thread Chet Ramey
Dan Nicolaescu wrote: > Dan Nicolaescu writes: > > > In tcsh the command run-fg-editor bound by default to C-M-z is > > extremely useful when you have an editor suspended. > > It makes it very easy to return to the editor, do some editing, then > > suspend the editor again, and the comma

only one coprocess?

2009-01-14 Thread Pierre Gaston
in the manpage: BUGS There may be only one active coprocess at a time. Is this still valid? it seems that bash issues a warning, but let you use more than one coprocess.

Re: coprocess suggestions

2009-01-14 Thread Chet Ramey
Pierre Gaston wrote: > I have a couple of suggestions about coprocesses. > If I understood correctly how coproc works, I think that > instead of : > coproc [NAME] command [redirections] > > the documentation would be a little clearer with something like: > > coproc simple-command [redirections] >

Re: coprocess suggestions

2009-01-14 Thread Pierre Gaston
On Wed, Jan 14, 2009 at 12:04 AM, Pierre Gaston wrote: > I have a couple of suggestions about coprocesses. > If I understood correctly how coproc works, I think that > instead of : > coproc [NAME] command [redirections] > > the documentation would be a little clearer with something like: > > copro

Re: truncating the path in the bash prompt?

2009-01-14 Thread Pierre Gaston
On Wed, Jan 14, 2009 at 9:56 AM, Dan Nicolaescu wrote: > Dan Nicolaescu writes: > > > In tcsh %c can be used to only show the last few directory names in a > > path (also see the ellipsis variable). > > > > For example for this directory: > > > > /lib/modules/2.6.21-1.3194.fc7/kernel/drive