Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alias/anon_function quoting issue
- X-seq: zsh-users 29107
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: linuxtechguy@xxxxxxxxx
- Cc: zsh <zsh-users@xxxxxxx>
- Subject: Re: alias/anon_function quoting issue
- Date: Fri, 14 Jul 2023 17:06:09 +0200
- Archived-at: <https://zsh.org/users/29107>
- In-reply-to: <CA+rB6GJ_opAWNCCBbQC=KQLwvYpjJ2Z6SK+yNjXqpuYyfKN+aw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CA+rB6GJ_opAWNCCBbQC=KQLwvYpjJ2Z6SK+yNjXqpuYyfKN+aw@mail.gmail.com>
On Fri, Jul 14, 2023 at 4:48 PM Jim <linux.tech.guy@xxxxxxxxx> wrote:
>
> e.g. Var=$'\e['
You don't need to quote the dollar sign within single quotes. The
single quote itself can be quoted by replacing it with '\'': the first
single quote closes the open one, \' inserts a literal single quote,
and the last single quote reopens the string literal.
alias name='() {
Var=$'\''\e['\''
}'
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author