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

Re: Lack of sanitisation of I/O in pushd/popd



On Mon, Feb 19, 2018 at 5:34 PM, Joao Paulo <joaolrpaulo@xxxxxxxxx> wrote:
> Hello,
>
> I am encountering some problems with the implementation of the pushd and
> popd. The spaces in directory paths should be sanitise so I can read them
> properly. This is if I have a folder named Google Drive in my home
> directory, I expect it to be `~/Google\ Drive` not `~/Google Drive`, this
> is causing me problems to read the data from the `popd -n` because there is
> no difference between that whitespace, and the whitespace used to print
> elements in the stack.

If you're wrapping popd in a function, you can just access the
directory stack elements via $dirstack. The user can disable popd
printing anything at all with setopt pushd_silent anyway.

-- 
Mikael Magnusson



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