zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: linuxtechguy@gmail.com
Cc: zsh <zsh-users@zsh.org>
Subject: Re: alias/anon_function quoting issue
Date: Fri, 14 Jul 2023 09:52:21 -0700	[thread overview]
Message-ID: <CAH+w=7bVGV4hW-_cLLDd3dgYxhxBvQimPDOWhnJ8Q7NM2SU=3g@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7Yc8W3xBcjfwbPJ=ts_Fw3DVA7xOD3jFn5ET5c8F2QA8w@mail.gmail.com>

On Fri, Jul 14, 2023 at 9:42 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
>     alias foo
>
> The shell will use a bit more elaborate quoting than strictly
> necessary in some cases

To clarify that:  The output of the "alias" command will use elaborate
quoting, not the internal representation of the alias.  You can see it
in a less convoluted form by examining the $alliases parameter:

% print -r -- $aliases[foo]
() {     Var=$'\e['  }

Or to get what you were originally after, single quoting:

% print -r -- ${(qq)aliases[foo]}
'() {     Var=$'\''\e['\''  }'


  reply	other threads:[~2023-07-14 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 14:46 Jim
2023-07-14 15:06 ` Roman Perepelitsa
2023-07-14 16:42 ` Bart Schaefer
2023-07-14 16:52   ` Bart Schaefer [this message]
2023-07-14 21:24   ` Jim
2023-07-27  8:50 ` Johan Grande
2023-07-28 21:53   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7bVGV4hW-_cLLDd3dgYxhxBvQimPDOWhnJ8Q7NM2SU=3g@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=linuxtechguy@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).