bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

$(case x in x)...


From: Dan Jacobson
Subject: $(case x in x)...
Date: Wed, 28 Dec 2005 21:43:15 +0800

The man page berates old-timers:
       When the old-style backquote form of substitution is used...
However, who is it that is too hungry for the next ")"?:
$ k=$(case x in x) :;; esac)
bash: syntax error near unexpected token `;;'
$ k=$(case x in x) :; esac)
bash: syntax error near unexpected token `esac'
$ k=`case x in x) :; esac`
$
The man page even mentions:
       Command substitutions may be nested. To nest when using the
       backquoted form, escape the inner backquotes with backslashes.
But tripping/conflict over case esac innards hadn't been discovered
until today for $() so isn't mentioned.  Fix the "bug" or mention it
here and in the "case ... esac" sections of all docs.

By the way,
>> How can one make a "ESC ." command that will get the last word from
>> the last line, even if we have just hit a few ^P's?

C> You'll have to modify the source, since ^P changes your position in
C> the history list.

(It is more likely that the source will modify me. Anyway, I end up
pasting with the mouse 30 times a day. I have only once in my life
used ^R.....ESC. or ^P^P^P...ESC. as offered.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]