Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] cd: Append 2nd argument to CWD if 1st is empty



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