Re: ...Limitation?

2006-09-26 Thread Paul Jarc
mwoehlke <[EMAIL PROTECTED]> wrote: > I am trying to figure out how to run a command and pipe the output > through tee, and then check the status of the original command. This uses a bash-specific feature: cmd > >(tee file); status=$? This should work on any sh: exec 3>&1 && status=`exec 4>&1 &&

...Limitation?

2006-09-26 Thread mwoehlke
Not really a bug, but this seems to be the only bash list gname knows about, so... I am trying to figure out how to run a command and pipe the output through tee, and then check the status of the original command. Normally I am a very competent shell programmer, but this one has me stumped!

Re: ...Limitation?

2006-09-26 Thread Stephane Chazelas
On Tue, Sep 26, 2006 at 11:45:42AM -0400, Paul Jarc wrote: > mwoehlke <[EMAIL PROTECTED]> wrote: > > I am trying to figure out how to run a command and pipe the output > > through tee, and then check the status of the original command. > > This uses a bash-specific feature: > cmd > >(tee file); s

Re: ...Limitation?

2006-09-26 Thread mwoehlke
Paul Jarc wrote: mwoehlke <[EMAIL PROTECTED]> wrote: I am trying to figure out how to run a command and pipe the output through tee, and then check the status of the original command. This uses a bash-specific feature: cmd > >(tee file); status=$? Thanks Paul and Stephen for the replies. I a

Re: [BUG][bash][auto completion] if COMPREPLY contents ":" auto completion doesn't work properly

2006-09-26 Thread Chet Ramey
Vasily Tarasov wrote: > I suppose I've found a bug; I need to make this part of the FAQ. The `:' is special to readline: it splits words for the word completion code. The default set of such characters is available in the COMP_WORDBREAKS variable. Removing `:' from the value of that variable

Re: [BUG][bash][auto completion] if COMPREPLY contents ":" auto completion doesn't work properly

2006-09-26 Thread Paul Jarc
Chet Ramey <[EMAIL PROTECTED]> wrote: > Vasily Tarasov wrote: > >> I suppose I've found a bug; > > I need to make this part of the FAQ. The `:' is special to readline: it > splits words for the word completion code. That explains some of what's going on in this case, but not all. For the first

Re: [BUG][bash][auto completion] if COMPREPLY contents ":" auto completion doesn't work properly

2006-09-26 Thread Chet Ramey
> Chet Ramey <[EMAIL PROTECTED]> wrote: > > Vasily Tarasov wrote: > > > >> I suppose I've found a bug; > > > > I need to make this part of the FAQ. The `:' is special to readline: it > > splits words for the word completion code. > > That explains some of what's going on in this case, but not al

Re: [BUG][bash][auto completion] if COMPREPLY contents ":" auto completion doesn't work properly

2006-09-26 Thread Paul Jarc
Chet Ramey <[EMAIL PROTECTED]> wrote: >> Chet Ramey <[EMAIL PROTECTED]> wrote: >> Also, after two tabs, we have "qwe:qwe:o", but further tabs don't add >> any more "qwe:"'s for some reason I don't understand. > > Because the colon is still a word break character, and readline passes `o' > to the co

Re: [BUG][bash][auto completion] if COMPREPLY contents ":" auto completion doesn't work properly

2006-09-26 Thread Chet Ramey
> So it looks like the entire word is passed to the completion function; > COMP_WORDBREAKS is not consulted at that point. COMP_WORDBREAKS is > only used to decide how much text to erase before inserting the > completion text. Is that intended? Is the completion function > supposed to take care

out-of-range-offset or zero-length substring parameter expansion

2006-09-26 Thread Lorenzo Viali
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: i386-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/local

no parameter expansion and no special meaning to control operator

2006-09-26 Thread Lorenzo Viali
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: i386-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/local

Re: no parameter expansion and no special meaning to control operator

2006-09-26 Thread Paul Jarc
Lorenzo Viali <[EMAIL PROTECTED]> wrote: > eval "\"$CMDFILE\" $list" > because i need $CMDFILE to receive more than > one argument; but what happens is that if in the > script's option's arguments, there are substrings like > $i, those variable are expanded That will also happen wi