Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: string to array space problem in filenames
- X-seq: zsh-users 20473
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Subject: Re: string to array space problem in filenames
- Date: Fri, 28 Aug 2015 05:15:16 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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==
- In-reply-to: <55DFC1E6.5090400@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20150821215037.6b010cf7@ntlworld.com> <55DFC1E6.5090400@eastlink.ca>
On Fri, Aug 28, 2015 at 4:05 AM, Ray Andrews <rayandrews@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author