On Fri, Oct 27, 2017 at 2:12 PM, Chet Ramey wrote:
>
> Let's see if I can find some compromise language that will take care
> of the general case. Since it's a compromise, no one will be
> satisfied, of course.
Thanks -- any improvement would be good.
--
((x=>x(x))(x=>x(x)))
While writing a function to save the directory stack as a script, I
noticed that ${DIRSTACK[0]}, the current directory always has the tilde
unexpanded.
This is the same with bash-4.4.12 and bash-4.3.11.
I was wondering if this is an oversight since DIRSTACK[0] is the same as
PWD, or intentional.
See following example:
[STEP 100] # echo $BASH_VERSION
4.4.12(2)-release
[STEP 101] # v=\'\'
[STEP 102] # printf '%q\n' "$v"
\'\'
[STEP 103] # printf '%s\n' "${v@Q}"
''\'''\'''
[STEP 104] #
On Fri, Oct 27, 2017 at 3:28 PM, Eli Barzilay wrote:
> On Fri, Oct 27, 2017 at 2:37 AM, Clark Wang wrote:
> >
> > What `unset' does is special but there's nothing special when parsing
> > the command and bash even does not care if it's built-in command or
> > not.
>
> Exactly -- and this kind of
See following example:
[STEP 100] # echo $BASH_VERSION
4.4.12(2)-release
[STEP 101] # v=abc
[STEP 102] # printf '%q\n' $v
abc
[STEP 103] # printf '%s\n' "${v@Q}"
'abc'
[STEP 104] #
Is it possible to not quote the result since there's no special chars in
the string? I would expect ${var@Q} to prod
On Sun, Oct 29, 2017 at 10:44 PM, Clark Wang wrote:
>
> Different people have different expectations which they believe are
> all important.
Yes, and I have already went over this several times: this is an issue
that does confuse people, both ones that I have spoken to and in
tutorial/example/etc