From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24607 invoked by alias); 28 Aug 2015 19:24:35 -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: 20476 Received: (qmail 8018 invoked from network); 28 Aug 2015 19:24:32 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=W9UYH+FrKn4AXTMgefo3uQ==:117 a=W9UYH+FrKn4AXTMgefo3uQ==:17 a=IkcTkHD0fZMA:10 a=puRPZgwnvodrpm8uuhYA:9 a=QEXdDO2ut3YA:10 Message-id: <55E0AE60.9090706@eastlink.ca> Date: Fri, 28 Aug 2015 11:54:24 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: string to array space problem in filenames References: <20150821215037.6b010cf7@ntlworld.com> <55DFC1E6.5090400@eastlink.ca> In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit On 08/27/2015 08:15 PM, Mikael Magnusson wrote: > On Fri, Aug 28, 2015 at 4:05 AM, Ray Andrews wrote: > You forgot to include your code in the mail. At this point I'm hoping for a generic answer. Directory strings, separated by spaces, are written to a file, which is then read into an array and passed to 'select', but I need to protect spaces inside directory names. I expect the place to do it is here: echo -n " $PWD" >>! ~/.mydirstack; ... where I save the current directory. Somehow I need to protect any spaces in $PWD, and I'm sure it's easy if I could only remember how. I keep forgetting these simple things.