Re: how does bash parse back-ticks, anyway?

2007-04-20 Thread Sven Mascheck
Eric Blake wrote:

> Read the POSIX rationale:
> http://www.opengroup.org/onlinepubs/009695399/xrat/xcu_chap02.html

> | [...] While the newer "$()" form can process
> | any kind of valid embedded script, the backquoted form cannot handle
> | some valid scripts that include backquotes. For example, these
> otherwise
> | valid embedded scripts do not work in the left column, but do work
> on
> | the right:
> |
> | echo ` echo $(
> | cat <<\eof cat <<\eof
> | a here-doc with `  a here-doc with )
> | eofeof
> | `  )
> |
> | echo ` echo $(
> | echo abc # a comment with `echo abc # a comment with )
> | `  )

BTW,

My bash-3.2.15(1)/libc2.3.6/i686-pc-linux-gnu-2.6.13 (like previous
releases) fails on the first $() example.  It also fails if the
here-doc contains a single, double or back quote instead of the ).

"case x in x)" in $() is also not accepted; this is to be worked
around with "case x in (x)" (POSIX is stricter, though).

Academic failure: an embedded here-doc, with unproblematic content,
but ) as delimiter instead of eof.


[ksh93 and all almquist shells are robust about all these.
 zsh and pdksh behave very similar to bash.]

[[The second $() example from above was fixed with bash-3.2]]


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: how does bash parse back-ticks, anyway?

2007-04-20 Thread Chet Ramey
Sven Mascheck wrote:

>> | echo ` echo $(
>> | cat <<\eof cat <<\eof
>> | a here-doc with `  a here-doc with )
>> | eofeof
>> | `  )
>> |
>> | echo ` echo $(
>> | echo abc # a comment with `echo abc # a comment with )
>> | `  )
> 
> BTW,
> 
> My bash-3.2.15(1)/libc2.3.6/i686-pc-linux-gnu-2.6.13 (like previous
> releases) fails on the first $() example.  It also fails if the
> here-doc contains a single, double or back quote instead of the ).
> 
> "case x in x)" in $() is also not accepted; this is to be worked
> around with "case x in (x)" (POSIX is stricter, though).

These will be fixed in the next version of bash.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
   Live Strong.  No day but today.
Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Would bash ever use xterm color support as default?

2007-04-20 Thread shirish agarwal

Hi all,
  Most of us use bash by default. And bash is not intuitive atleast for
people who are new to the system. I'm sure there have been suggestions made
for this before & would be made after me and I guess the people maintaining
bash would have some valid points why things like intelligent history
completion, tab-completion, having color support have not been made
defaults. Please lemme know any links or rationale which are behind these
decisions.
  Couple of links https://wiki.ubuntu.com/Spec/EnhancedBash as well as
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/103929 which want to do
this. Of course there are others like fishshell http://fishshell.org/ which
do the same thing but my question is why not bash? Hoping for some
constructive comments on this. Thanx for your time.
--
 Shirish Agarwal
 This work is licensed under the Creative Commons NonCommercial Sampling
Plus 1.0 License. To view a copy of this license, visit
http://creativecommons.org/licenses/nc-sampling+/1.0/
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash