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

Re: cannot `cd $_` to $_ containing spaces



On Tue, Oct 13, 2020 at 12:30:57PM -0700, Soren Roth wrote:
> I made a directory with a space in the name, and tried to cd into it using
> $_, and failed. Just trying to be a good citizen, I wouldn't be surprised
> if this is known or somehow a feature.
> 
> 
> ~ % mkdir ArcGIS\ SDKs
> 
> ~ % cd $_
> 
> cd: string not in pwd: ArcGIS

This appears to be an issue with some part of your setup. It works in
zsh -f.

% PROMPT='%% ' zsh -f
% mkdir foo\ bar
% cd $_
% pwd
/home/phy1729/foo bar




Messages sorted by: Reverse Date, Date, Thread, Author