From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13586 invoked by alias); 19 Feb 2018 17:23:08 -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: 42374 Received: (qmail 18149 invoked by uid 1010); 19 Feb 2018 17:23:08 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f169.google.com 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(209.85.220.169):SA:0(-1.9/5.0):. Processed in 0.517963 secs); 19 Feb 2018 17:23:08 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NTwSUqCugS6C5KCLCBHhtbrcLCv8RawL8512qd8YKvA=; b=foSU25ftxVITOcYft3nOozK1pLxSzg/7uo+FDQ3zhr1+YiC6PRAR2rBLAsKLDN6d23 RnDyaiZzvOZ2zil3oMgIOQjDrjHOg7QsUi+B0pykWA418iLXL4s9B0axc77ByqvcmFeE +Bf4FlWBTz40TpR19KL7gWRPCi6dOePa3ix/35Ph1qIVB8YObyB5munYACCUuQvzrjJT Qs6rodsjYvvcU07pxVdcDnlRGI0XQFNkc2UeK9neY7KGd2esVZHxCbaU5yDS41C0ybUj bfIm9tA1J8Nim83bSLkB2M/+hVbZvBS2tmNCtgn5e+H0mLfr9D9ioiK16C8wgcc1DP7X YnUw== X-Gm-Message-State: APf1xPDMq7HsfH0wu19Tdqm8ZyHNMMgP/ef1YkOSxtNuCsZdFnYHW+ty 6ZwmW72y7u4bFeFIwcEr4qlxP/zEpOoL6bQ10VQ= X-Google-Smtp-Source: AH8x226ZFnYHRHseFruAD0Oy2ajXfezOEWyVmKgr83muM2b/HJxt5t3E53HMd1mGLSEpY+HQf4kBiVIvsauYuweV8nc= X-Received: by 10.233.239.82 with SMTP id d79mr24062047qkg.190.1519060984051; Mon, 19 Feb 2018 09:23:04 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Mikael Magnusson Date: Mon, 19 Feb 2018 18:23:03 +0100 Message-ID: Subject: Re: Lack of sanitisation of I/O in pushd/popd To: Joao Paulo Cc: zsh workers Content-Type: text/plain; charset="UTF-8" On Mon, Feb 19, 2018 at 5:34 PM, Joao Paulo 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