From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 20344 invoked from network); 27 Apr 2020 20:05:26 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 27 Apr 2020 20:05:26 -0000 Received: (qmail 11260 invoked by alias); 27 Apr 2020 20:05:14 -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: 45732 Received: (qmail 13334 invoked by uid 1010); 27 Apr 2020 20:05:14 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk1-f193.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25793. spamassassin: 3.4.4. Clear:RC:0(209.85.222.193):SA:0(-1.9/5.0):. Processed in 2.925926 secs); 27 Apr 2020 20:05:14 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.222.193 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rHh/5sjXwLN4li/r17z728WlST2FKZo5dZ5MHkvMDkk=; b=dVfRv8ONaZEAGMq3gzY3PnJ0SH4d1pHCt3EeXsngi9TsnZA6viEbCUn7tGAcDYUKba HlXA6HfZExsiAO/9qUqu2rHpZPf2APcirpQHPHEaAXUPPa6jjIPk7RptIFLk++tw69sy T25a2pNJxdAHMmtes2Jx8iQnkIVQG4BCQBcq7CXpRgOzSRamTuH6z5zPRo+pnhzY126+ d7VvMb5WweuBP/IED7mr5m58IfX0eeHNcvImuLe5kdlyi12URg6fyFcwu2ZoMWlE/z03 Cvi3Vc2VUyxyL6lYaE+SNbBrFq94/T6mWdhB0EEhIiSK+J+Q9T74GgFQ1XZ0KCAwkbQJ WOtw== X-Gm-Message-State: AGi0PuZoK/3JYyAG9UaxRasnSr3/WNuCHE0kQL1XQjGwbpXguUjt5pZm ZSMojOkoQAlB82YWBc/wStVGZ1U4Ewo= X-Google-Smtp-Source: APiQypIiHGg0JmbTPOVhzwdtk/kTVANFQxCHj1pRoPzrE2woqkYTFD/cjdOU51k+CiKxdQRDFgCQsw== X-Received: by 2002:a37:a312:: with SMTP id m18mr22152823qke.251.1588017877417; Mon, 27 Apr 2020 13:04:37 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: [PATCH 2/2] _arguments: Add the -0 flag, which makes $opt_args be populated sanely. From: dana In-Reply-To: <20200427193040.7484-2-danielsh@tarpaulin.shahaf.local2> Date: Mon, 27 Apr 2020 15:06:15 -0500 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <669167A9-2B46-446C-A488-FD766A6CFD6D@dana.is> References: <20200427193040.7484-1-danielsh@tarpaulin.shahaf.local2> <20200427193040.7484-2-danielsh@tarpaulin.shahaf.local2> To: Daniel Shahaf X-Mailer: Apple Mail (2.3608.60.0.2.5) On 27 Apr 2020, at 14:30, Daniel Shahaf wrote: > Without this, the completion function would have to reverse the = "escape > colons and backslashes and join with colons" operation, and I don't = know > of an easy way to do that. I think this is a problem in a few other parts of the completion system (though i can't remember specifically where), and with anything that = uses DSV, like PATH-style variables. I always thought it'd be cool if (j) and (s) supported optional (un)escaping, maybe something like this: % arr=3D( 'foo' 'bar:baz' 'qux\quux' ) % print -r ${str::=3D${(j<:><\>)arr}} # Join by :, use \ as escape = character foo:bar\:baz:qux\\quux % print -rl ${(s<:><\>)str} # Split by :, use \ as escape character foo bar:baz qux\quux Then you wouldn't have to do weird find/replace stuff, and it wouldn't = break if you had like an escaped back-slash in front of your delimiter In this case `_arguments -0` would be faster/simpler and require less 'user-land' boiler-plate though. Haven't looked closely at the patch, = but i'd use it dana