From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29802 invoked by alias); 3 Sep 2015 04:48: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: 20495 Received: (qmail 16800 invoked from network); 3 Sep 2015 04:48: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=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=sM2sPFyZBXNmCrSqgZuE9pe+oiqGhF321bTzGFvCGu4=; b=WgFR9QK8UZOSBfrA7pUS/DJ8rgxkPgJJN3WWdoCMKPSxBwHrUQ31lil4um7tseK8qe NeezMu7WRMtS4B9iTILGwkxxRRln+ixLvWkVfA3vv/DSbo1iU+r32juLgcZ4mNVXCrM3 8vLObxGPq/XqU60S5/Yh76KVNpwQipPlzEez4Jja4Fc7qaMg2JgAgnRApc7GRXKVRG4p GNufPePbkjlDM2VjLDmLIDG9YKr/tVjd4Vk8b1YHEKw/6gVpnEJOvspeYbta2q4CDUKr DM5GZjp2Er0nLp0tyFFccm3hX6FrezrFyAZYjKdyz1SZue47CjQa+VFixupsiN4+z6pJ ozoA== X-Gm-Message-State: ALoCoQkYfheiJpsU80jaubJP6WoZZ+ipvxw4jmlwDJZC5gToEODAYlEBu3X2LxMr7tnXY+ZxNxf4 MIME-Version: 1.0 X-Received: by 10.152.9.103 with SMTP id y7mr19456618laa.111.1441255697345; Wed, 02 Sep 2015 21:48:17 -0700 (PDT) In-Reply-To: <55E7C084.2060505@eastlink.ca> References: <20150821215037.6b010cf7@ntlworld.com> <55DFC1E6.5090400@eastlink.ca> <55E0AE60.9090706@eastlink.ca> <150828124334.ZM7129@torch.brasslantern.com> <55E7C084.2060505@eastlink.ca> Date: Wed, 2 Sep 2015 21:48:17 -0700 Message-ID: Subject: Re: string to array space problem in filenames From: Kurtis Rader To: Ray Andrews Cc: Zsh Users Content-Type: multipart/alternative; boundary=089e01494af0df0611051ed07d24 --089e01494af0df0611051ed07d24 Content-Type: text/plain; charset=UTF-8 On Wed, Sep 2, 2015 at 8:37 PM, Ray Andrews wrote: > On 08/28/2015 12:43 PM, Bart Schaefer wrote: > > Bart, > > Got around to the spaces in filenames thing: > >> >> If you insist on storing it all on one line, then you need to quote the >> spaces on the way out: >> >> echo -n " ${(q)PWD}" >>! ~/.mydirstack; >> >> I've got it all more or less working except I can't figure out how to > write the array--with newlines now, not with spaces--back to the file. > Everything I try ends up on one line, which is now not what I want anymore. > See the "F" flag in the "Parameter Expansion Flags" of the "man zshparam" page: Join the words of arrays together using newline as a separator. This is a shorthand for `pj:\n:'. For example: $ set -A x a b c $ echo $x a b c $ echo ${(F)x} a b c -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank --089e01494af0df0611051ed07d24--