Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/local
On Thu, Oct 01, 2009 at 04:17:33PM +0200, Martin von Gagern wrote:
> #!/bin/bash
>
> shopt -s extglob
> f() {
> if [[ $v == a@(a|b|c)c ]]; then
> case $v in
> a@(a|b|c)c)
You're using extglobs inside a function, and extglob wa
Greg Wooledge wrote:
> You're using extglobs inside a function, and extglob was enabled
> at the time the function was delcared. The parser parsed them at that
> time, decided that they are extended globs, and therefore that's what
> they are.
Then why don't they work as extended globs if the ext
On Wed, 2009-09-30 at 23:13 +0200, Andreas Schwab wrote:
>
> Just make sure the write side of the pipe is not closed prematurely.
Hrm. Yes, of course. John's solution of having a null writer keeping
it open is one way -- which I might just use.
> $ (n=0; while [ $n -lt 10 ]; do cat /dev/zero;
"Brian J. Murrell" writes:
> But this is where (simplified) my example using cat went sideways. :-(
> In my real world use, the first cat is actually mplayer and doesn't have
> the option of writing to stdout instead of a named file for this
> particular use of it.
Perhaps you can use /dev/stdo
I decided to make this into a blog post to in some way contribute back
to the community for all the help I got.
http://muublog.blogspot.com/2009/10/bash-completion-for-playing-movies.html
Enjoy!
/Mathias
Martin von Gagern wrote:
> I've found out that extglobs behave differently in different
> constructs. To avoid syntax errors, the always have to be
> enabled at parse time.
> For comparison constructs like ``[[ $v == a@(a|b|c)c ]]'' this
> is enough. For case construct
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/loc
Chet Ramey wrote:
> In general, if you enable extglob before a function is parsed and leave
> it on when the function is executed, you should be ok.
I'm thinking about this in terms of bash completion functions. Many of
them use extended globs, but they should not force a specific permanent
extglo
Martin von Gagern wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: i686-pc-linux-gnu-gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
> -DCONF_VE
10 matches
Mail list logo