Re: + vs. [^/]* - Regular Expression bug?

2010-02-09 Thread DennisW
On Feb 8, 11:38 pm, Morten Lauritsen Khodabocus wrote: > Hello, > > Ran into some particular behaviour with REs in bash, I just cannot > understand how this could possibly be correct behaviour. Then again, I > am no bash guru, could very well be me missing a clue. > > If I am wasting your time, si

Re: [^/]+ vs. [^/]* - Regular Expression bug?

2010-02-09 Thread Andreas Schwab
Morten Lauritsen Khodabocus writes: > Two regular expressions should match the same thing, but for some reason > do not: > [[ '/home/' =~ [^/]+ ]]; echo ${bash_remat...@]} > and > [[ '/home/' =~ [^/]* ]]; echo ${bash_remat...@]} > the first matches 'home', the second matches nothing. The only dif

[^/]+ vs. [^/]* - Regular Expression bug?

2010-02-09 Thread Morten Lauritsen Khodabocus
Hello, Ran into some particular behaviour with REs in bash, I just cannot understand how this could possibly be correct behaviour. Then again, I am no bash guru, could very well be me missing a clue. If I am wasting your time, sincere apologies. I am not subscribed to the list, so please inc

Re: colored bash prompts seem to confuse readline

2010-02-09 Thread Chet Ramey
> Well ok its not just a plain colored prompt, what I would like to use is > this: > > txtred='\e[0;31m' # Red > bldgrn='\e[1;32m' # Green > txtrst='\e[0m'# Text Reset > PROMPT_COMMAND=' \ > if [ $? -eq 0 ]; then \ > PROMPT_PREFIX="$txtred"; \ > else

Re: colored bash prompts seem to confuse readline

2010-02-09 Thread Greg Wooledge
On Tue, Feb 09, 2010 at 08:39:49AM -0900, Britton Kerin wrote: > Well ok its not just a plain colored prompt, what I would like to use is > this: > > txtred='\e[0;31m' # Red > bldgrn='\e[1;32m' # Green > txtrst='\e[0m'# Text Reset > PROMPT_COMMAND=' \ > if [ $? -eq 0 ];

colored bash prompts seem to confuse readline

2010-02-09 Thread Britton Kerin
Well ok its not just a plain colored prompt, what I would like to use is this: txtred='\e[0;31m' # Red bldgrn='\e[1;32m' # Green txtrst='\e[0m'# Text Reset PROMPT_COMMAND=' \ if [ $? -eq 0 ]; then \ PROMPT_PREFIX="$txtred"; \ else \ PROM