From: Mikael Magnusson <mikachu@gmail.com>
To: Joao Paulo <joaolrpaulo@gmail.com>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: Lack of sanitisation of I/O in pushd/popd
Date: Mon, 19 Feb 2018 18:23:03 +0100 [thread overview]
Message-ID: <CAHYJk3QVZuqjt5RKEDrFkOA221DMcteOpO1Z7o=VZVbw2MA3sw@mail.gmail.com> (raw)
In-Reply-To: <CAOr4F+P5ZVv4OiiodBkY2m3bxfNFTvX3ow2AUbuYxfU9CPYgUQ@mail.gmail.com>
On Mon, Feb 19, 2018 at 5:34 PM, Joao Paulo <joaolrpaulo@gmail.com> 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
next prev parent reply other threads:[~2018-02-19 17:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 16:34 Joao Paulo
2018-02-19 17:13 ` Leah Neukirchen
2018-02-19 17:23 ` Mikael Magnusson [this message]
[not found] ` <CAOr4F+Phd=gFZten4-21OMv=khuKObreW4xxHyR85VgKEkdKAw@mail.gmail.com>
2018-02-19 18:31 ` Mikael Magnusson
2018-02-19 18:33 ` Joao Paulo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHYJk3QVZuqjt5RKEDrFkOA221DMcteOpO1Z7o=VZVbw2MA3sw@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=joaolrpaulo@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).