Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Lack of sanitisation of I/O in pushd/popd
- X-seq: zsh-workers 42374
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Joao Paulo <joaolrpaulo@xxxxxxxxx>
- Subject: Re: Lack of sanitisation of I/O in pushd/popd
- Date: Mon, 19 Feb 2018 18:23:03 +0100
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NTwSUqCugS6C5KCLCBHhtbrcLCv8RawL8512qd8YKvA=; b=vFwXOtsLjmoBkex/dYiLgulwg7qQ/ivm4jssAgO4H1pD/c7Bwi5OeScRJgEt0jgbt3 icZO6JU4YkFTFx6o82zUheLwOAO8y3VULicc/PlnXcafPYDm6apwhdX1j79kLOUrfNW6 R9Znj50Re/z5AcD70XgFUcwKMz8cAeN+lBBAAh9nxjL7pf3hphRVU86ynChBkUvrkHix AJ6uCaPu2V3M8sfxDjj0NzbqTS28NJl/ttOkLDT47fMcVeIYpZ5nRXevCLDS/ece+mdr rRJSVvZJG/nl07IgIwzE6kb6gpivKZn1aRiYElgy6tCAYIh8hW5yRm5mTzhyNjAKTj2I 3zHQ==
- In-reply-to: <CAOr4F+P5ZVv4OiiodBkY2m3bxfNFTvX3ow2AUbuYxfU9CPYgUQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAOr4F+P5ZVv4OiiodBkY2m3bxfNFTvX3ow2AUbuYxfU9CPYgUQ@mail.gmail.com>
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