Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Allow '=' aliases to be used with -L
- X-seq: zsh-workers 42513
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Joey Pabalinas <joeypabalinas@xxxxxxxxx>
- Subject: Re: [PATCH] Allow '=' aliases to be used with -L
- Date: Fri, 23 Mar 2018 17:29:53 +0000
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ulSgDLyQQQKrhQ4TafCJFCAZZesT+Mvw+nARPVfbmKc=; b=cQ4gUksY3gDcJbGia40JKsugUWHbbBT3cZfr4BuHTUbSVqAvuEln3xZxAe8OvObqxX Zo1NirhDd5FcAxgMQW6XTIQ6KEJlSuAHzbVjIP2OLk4o0u5gAPlzMjV9m/XxPQYd36vl 1cAUHr+ZWmzTbgnDs26/1gIBEB4ysQc2cY5AQ6ObUd53dNd1jki4+R7KyIseDaRqKGOQ MlbcIXErgNvcFwlRiD8zv2H/apEvnEta3lztb9S3SQx2DVGATvRUWRqf0UXuNThx8d1d YpWhSGGGaV225/zBwIDSTethCluJDOW2RBe3FPo3ZELB0M6XB7l+C44p4YHUdlmCjU82 Ekdg==
- In-reply-to: <20180322011905.45n377wsxp62k57e@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: Joey Pabalinas <joeypabalinas@xxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180322011905.45n377wsxp62k57e@gmail.com>
2018-03-21 15:19:05 -1000, Joey Pabalinas:
> Special case '=' aliases so that they can be output correctly
> by -L and be used in startup scripts.
[...]
FWIW, another corner case:
$ aliases[(e)]=whatever
$ alias -L
alias ''=whatever
$ eval "$(alias -L)"
zsh: whatever not found
Actually, I didn't quite expect that error message, I would have thought
echo ''=foo
would be the same as
echo '=foo'
That the = operator would not be recognised in that context.
I can't say I like that behaviour. It gets worse with expansions:
$ echo $0=ls
/bin/zsh=ls
$ echo $1=ls
/bin/ls
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author