Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] cd: Append 2nd argument to CWD if 1st is empty
- X-seq: zsh-workers 52352
- From: Lawrence Velázquez <larryv@xxxxxxx>
- To: "Julian Prein" <druckdev@xxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] cd: Append 2nd argument to CWD if 1st is empty
- Date: Fri, 01 Dec 2023 13:21:34 -0500
- Archived-at: <https://zsh.org/workers/52352>
- Feedback-id: iaa214773:Fastmail
- In-reply-to: <3uINOrbo4IXmuxTPyOMY6U_gv4-qULOThBv5Hd01KcO76FK9AvEFOOIo02fy5VQBIrudqP7rz__wEo1FOG2X2cMLkJzV1wp-1fYkCKYID_8=@protonmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <IZyXHgegIr8a18HfmW1WE7S2UYguBiREgTX0rv0u4WXrJO92IhaP9PVRDvoiEan85dZZL6Gvi4dQeSAgTAiFWitlFReFgse2lMJvCDcsbZM=@protonmail.com> <CAN=4vMrnmJuZ75bgcT94tah8cUDEG6V2fZh=U_u50wdG=TsPxg@mail.gmail.com> <3uINOrbo4IXmuxTPyOMY6U_gv4-qULOThBv5Hd01KcO76FK9AvEFOOIo02fy5VQBIrudqP7rz__wEo1FOG2X2cMLkJzV1wp-1fYkCKYID_8=@protonmail.com>
On Fri, Dec 1, 2023, at 8:32 AM, Julian Prein wrote:
> My motivation to submit this patch was primarily the assumption that specifying
> an empty argument is an edge case that is not well defined in the documentation
> and that the current behaviour is limited in its use cases. To me an appendix
> seems more flexible in the ways a user can utilize this.
FWIW the current behavior -- while undocumented -- is aligned with
that of ksh, and this change would break that alignment and become
one more thing for ksh emulation to handle.
% cd /bin
% ksh -c 'print "$KSH_VERSION"; cd "" /usr'
Version AJM 93u+ 2012-08-01
/usr/bin
% mksh -c 'print "$KSH_VERSION"; cd "" /usr'
@(#)MIRBSD KSH R59 2020/10/31
/usr/bin
The old behavior is not a bug, and the new behavior doesn't strike
me as particularly useful, so it's not clear to me that this would
be worth it (either as a breaking change or one hidden behind yet
another option).
--
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author