From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12667 invoked by alias); 28 Aug 2015 03:15:23 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20473 Received: (qmail 14770 invoked from network); 28 Aug 2015 03:15:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=c3K/eVygCu+ehOCIF/t55kuPSHOIAMOnIA6TF4KfRcw=; b=z97OMhifAA2YkIY2xsuku5/XlIEqd9PmTdrnxhIbJm82CRIe6F3TAJ52uVfM0drgFq XIzbJNn5yYz2SG3QogctmjLEtTvaJY6/+++bFb3+ROT3U9FAk+8cVk4oyC65ARFH/Wii 6Orv1b+bMV05EOr2qr2fxi9IbMq4SdNSv25hFrsC7O5IcxNpx2j2et1gCohS7OHV78wB PDSpiIQkWaGCcOs9dQ3niSJVldpikvSb83DbpEVK8+jBBfJvxk1opetmZE2gTJsZv4E6 EayEjvIFfq+kafRyio9t+uFl73nl1RgKXFfnjIKli+U7MJROnSxCbe6y/69KVBo/3ouS 4TXw== MIME-Version: 1.0 X-Received: by 10.140.217.138 with SMTP id n132mr12927861qhb.96.1440731716906; Thu, 27 Aug 2015 20:15:16 -0700 (PDT) In-Reply-To: <55DFC1E6.5090400@eastlink.ca> References: <20150821215037.6b010cf7@ntlworld.com> <55DFC1E6.5090400@eastlink.ca> Date: Fri, 28 Aug 2015 05:15:16 +0200 Message-ID: Subject: Re: string to array space problem in filenames From: Mikael Magnusson To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Fri, Aug 28, 2015 at 4:05 AM, Ray Andrews wrote: > Gentlemen: > > I should probably know this, but I'm rusty after a few months not thinking > about zsh. I have a personal implementation of a dirstack that just pushes > $PWD to the end of a file then rereads the file to an array which is then > sent to 'select' to let me change directory. I like it because it survives > reboot and works across xterms and removes duplicates and so on. The only > thing that trips it up is when a directory is pushed that contains a space. > I have few of those, so it's just an irritation, still I'd like to fix it if > possible. Here's one of the offending directories: > > pts/1 HP-w5--5-Debian1 root /root/.icedove/Ray/Mail/Local Folders > > ... which 'select' does this with: > > > 1) QUIT > 2) /aWorking/Zsh > 3) Folders > 4) /root/.icedove/Ray/Mail/Local > > ... because it breaks at the space, obviously. Is there some way around > that? I've tried various quotes and slashes and incantations and spells, > but no luck. I expect that 'select' can't be expected to behave differently > so somehow the array needs to know to protect spaces in directory names. > I'm fuzzified why protecting them with quotes doesn't do it. You forgot to include your code in the mail. -- Mikael Magnusson