help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] pass command to script


From: Christof Warlich
Subject: Re: [Help-bash] pass command to script
Date: Fri, 26 Apr 2019 22:14:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Am 26.04.19 um 21:13 schrieb Chet Ramey:

That's not correct. If you want to use the chosen close quote character
in an enclosed command, you have to have a way to quote it. For
completeness, you'd need a way to quote the opening sequence. Once you
have that, you need semantics to remove the quotes, and you're back to
semantic sugar that's little different from $'...'.

I'm not sure what you were about to say, my best quess is replacing
some of your "quote"s with "_escape_"s:

> That's not correct. If you want to use the chosen close quote character
> in an enclosed command, you have to have a way to _escape_ it. For
> completeness, you'd need a way to _also_ _escape_ the opening
sequence. Once you
> have that, you need semantics to remove the _escapes_, and you're back to
> semantic sugar that's little different from $'...'.

But still I don't see why you think that escaping would still be necessary!?
Imo, the only reason why escaping _is_ necessary _now_ is that it allows
keeping
track of the current nesting depth. But with any type of
distinghuishable opening
and closing quote characters, the nesting level would always be evident
right
away by just incrementing the nesting depth on any opening quote and
decrementing
it on any closing quote.

Surely I may be wrong, unfortunately that happens from time to time ;-).
But if so,
I would really like to understand where or why! Or is it "just" an
implementation
issue of the bash source code (or, much more severe, a backward
compatibility
issue that I do not see) that may make it (almost) impossible to implement
the idea.

Please also have a quick look at what I replied to Greg, I again did put
quite some
effort into that post to illustrate the gist of my idea.





reply via email to

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