From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20410 invoked by alias); 19 Feb 2018 17:31:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42375 Received: (qmail 14580 invoked by uid 1010); 19 Feb 2018 17:31:48 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(-0.9/5.0):. Processed in 28.628791 secs); 19 Feb 2018 17:31:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Leah Neukirchen Subject: Re: Lack of sanitisation of I/O in pushd/popd Date: Mon, 19 Feb 2018 18:13:21 +0100 Message-ID: <87d110vr66.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) In-Reply-To: (Joao Paulo's message of "Mon, 19 Feb 2018 16:34:32 +0000") Joao Paulo writes: > 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. popd -n is not even documented, and more a sideeffect of the implementation that it works. You can list the stack with "dirs -p" linewise, or just access the array $dirstack directly. hth, -- Leah Neukirchen http://leah.zone