, tell me
about it, and I'll try a bit harder to get this into the offical
sources. If I get no single answer this time as well, I'll probably post
the patch somewhere online, patch my own version of bash, and that's it.
Greetings,
Martin von Gagern
signature.asc
Description: OpenPGP digital
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'
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
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 constructs
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
extglob
to a completion. Instead, the only
places where such a check should be performed are in my opinion the
initial prompt after startup and any prompt after a command was actually
executed. Just pressing enter with an empty command line should also do
the check, I think.
Greetings,
Martin von Gagern
Hi Chet,
thanks for the swift reply!
On 11.08.2011 15:54, Chet Ramey wrote:
I suspect that you have a completion defined for `ls' and it's running a
command or process substitution that's causing the mail check. Can you
run `set -x', then attempt the completion again and post the results?
On 12.08.2011 01:05, Chet Ramey wrote:
It's eval. Try the attached patch.
Works like a charm. Thanks a lot!
Martin
signature.asc
Description: OpenPGP digital signature
I'll be happy with any
solution.
Greetings,
Martin von Gagern
signature.asc
Description: OpenPGP digital signature
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
uname output: Linux … 5.18.16-…-amd64 #1 SMP PREEMPT_DYNAMIC Debian
5.18.16-… (2022-…) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 5.2
10 matches
Mail list logo