Re: bash: S>99?4:S>9?3:S>0?2:0: syntax error in expression

2008-04-20 Thread Chet Ramey
Archimerged Ark Submedes wrote: Machine Type: i386-redhat-linux-gnu Bash Version: 3.2 Patch Level: 33 Release Status: release Description: gcc accepts the expression S>99?4:S>9?3:S>0?2:0 bash 3.2(33) does not. I claim this is a bash bug: gcc is perfectly happy with S>99?4:S>9

Re: Cannot bind ctrl-u to a readline function in bash.

2008-04-20 Thread Chet Ramey
Woody Thrower wrote: It appears that bash cannot bind ctrl-u either by using the "bind" command, or by reading .inputrc at startup. By default, readline binds the tty editing characters (erase, kill, literal-next, word-erase) to their readline equivalents when it's called, if they're bound to r

Re: Cannot bind ctrl-u to a readline function in bash.

2008-04-20 Thread Bob Proulx
Chet Ramey wrote: > Woody Thrower wrote: > >It appears that bash cannot bind ctrl-u either by using the "bind" command, > >or by reading .inputrc at startup. > > By default, readline binds the tty editing characters (erase, kill, > literal-next, word-erase) to their readline equivalents when it's

Re: Cannot bind ctrl-u to a readline function in bash.

2008-04-20 Thread Chet Ramey
Bob Proulx wrote: Normally control-u is bound to tty driver kill. Because of there is a tty driver value for ^U that value always overrides any readline binding. But if ^U is remove from the tty driver setting then it won't. There isn't a portable way to unset these values in the tty driver b

Re: Cannot bind ctrl-u to a readline function in bash.

2008-04-20 Thread Bob Proulx
Chet Ramey wrote: > Bob Proulx wrote: > >Normally control-u is bound to tty driver kill. Because of there is a > >tty driver value for ^U that value always overrides any readline > >binding. But if ^U is remove from the tty driver setting then it > >won't. > > Note that undefining a tty editing

Q: bash parameter expansion

2008-04-20 Thread Dmitry V. Levin
Hi, I wonder whether such difference in parameter expansion is valid: $ env -i sh -c 'fun() { echo "[${*#foo }]"; }; fun foo bar' [foo bar] $ env -i sh -c 'fun() { echo "[${*#foo}]"; }; fun foo bar' [ bar] $ sh --version GNU bash, version 3.2.33(1)-release (x86_64-alt-linux-gnu) Copyright (C) 200

Re: Cannot bind ctrl-u to a readline function in bash.

2008-04-20 Thread Woody Thrower
Chet Ramey wrote: > By default, readline binds the tty editing characters (erase, kill, > [...] Use the `bind-tty-special-characters' variable to enable or disable this > behavior. > Thanks. That does indeed address my issue. I understand and appreciate using the tty editing bindings by default