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 d...@ics.uci.edu wrote: Dan Nicolaescu d...@ics.uci.edu 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:

Re: coprocess suggestions

2009-01-14 Thread Pierre Gaston
On Wed, Jan 14, 2009 at 12:04 AM, Pierre Gaston p...@freeshell.org 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

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] coproc

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: run-fg-editor for bash?

2009-01-14 Thread Chet Ramey
Dan Nicolaescu wrote: Dan Nicolaescu d...@ics.uci.edu 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

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'

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

Re: coprocess suggestions

2009-01-14 Thread Andreas Schwab
Chet Ramey chet.ra...@case.edu 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:

Re: truncating the path in the bash prompt?

2009-01-14 Thread Matthew Woehlke
Dan Nicolaescu wrote: Dan Nicolaescu d...@ics.uci.edu 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/

Re: coprocess suggestions

2009-01-14 Thread Chet Ramey
Andreas Schwab wrote: Chet Ramey chet.ra...@case.edu 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

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 be

Re: truncating the path in the bash prompt?

2009-01-14 Thread Paul Jarc
Matthew Woehlke mw_tr...@users.sourceforge.net 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

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

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'

Re: dabbrev-expand behavior

2009-01-14 Thread Dan Nicolaescu
Chet Ramey chet.ra...@case.edu 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: [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 commands. I

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 works with ^^s

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/~chet/