From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25576 invoked by alias); 24 Aug 2017 08:57:32 -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: X-Seq: 41593 Received: (qmail 3580 invoked by uid 1010); 24 Aug 2017 08:57:32 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.26):SA:0(-2.6/5.0):. Processed in 1.103399 secs); 24 Aug 2017 08:57:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zJVXt+ +M44dh+2em6ZsMK1JfEcKE0xkMZCEWrncV06I=; b=FLK/kuKeImnxAm7uRqo6e8 IT3YRyvQfcGip7yhFwb/7yUydkvaCesa8hyK+2YPq+zsWtNHxqKCcyJ8yrER5BBh DWGHZWYdwzxMU7rG7P/L1RGHlmRqkZPOyMEYrYQ5EAUKB8U/6unZ5KmJWovQ6U/x hB5+DBTMy9TKZK8Qux2CCtnu22lbrQdrKyJQ6YjhQU30TZ9Ah/e9fUQbWqTqxkyo WAB0eR6tXVhzl8ee+xzXqRPvs8GBGJQKLvQhr0FsOKw0Z/+S8s8cZbuK+4rMkIsv 7jbmwwsICyZyG34F8cNKgJTx6bcoOKzPheWwR/Bvvjk3zdnLIzJGYAEPX7Okf7bg == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zJVXt+ +M44dh+2em6ZsMK1JfEcKE0xkMZCEWrncV06I=; b=CD0PXFXCnFBiiKj1/2OUyp 1v++wYNx81aKV84TYaGY//4qqLmSw1kp2sK2ZNn+YLct9u96NAcDAztWdh6TfZ5B SNFYiKUg1zBkwttmlYD5P1n54J6kKZR4m+HRi59FVbqGV7v5Rdob6G/TUjnSwUy/ 8PVR1p6FBXmuPR6sIwFGgsp8Jxxw965x9CSMyGJoWKIXORouYowip92IzqnvZXWc rtLe/DSTH6C/AVgR4yHb13wuXcZauSaAV7DrhDQ7EAqyEEYfDAEJBYJRm1z+x+1u zK7+k8rZ2mVqkAfPsMLoEXw3498b65dTHs8aw7RuvQuhK+cc7Ps9/tlqvl3YDLEw == X-ME-Sender: Message-Id: <1503564514.1008441.1083427592.72F40F32@webmail.messagingengine.com> From: Daniel Shahaf To: Mikael Puhakka Cc: zsh-workers@zsh.org, Phil Pennock MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-13b5a8c9 References: <20170823191739.GA35723@tower.spodhuis.org> Subject: Re: Two different zsh sessions handle $* differently Date: Thu, 24 Aug 2017 08:48:34 +0000 In-Reply-To: Mikael Puhakka wrote on Thu, 24 Aug 2017 09:05 +0300: > On 8/23/17, Phil Pennock wrote: > > You can use `setopt xtrace` (or `set -x`) to have zsh emit diagnostics > > of what it's doing, so if you do that before invoking `j` then you might > > see something different in the two environments. > > This shows something alright: > > (~) j Test. ABC ABC ABC. > +preexec:0> print -Pn '\e]2;zsh: %~\a' > +zsh:1165> j Test. ABC ABC ABC. > (*) +j:0> journal.py Test.ABCABCABC. > argv ['Test.'] > +precmd:0> print -Pn '\e]2;zsh: %~\a' > +zsh:1166> parse_git_branch > +parse_git_branch:1> git branch --no-color > +parse_git_branch:2> sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' > > The starred line doesn't look correct. With a fresh session the same > line goes like this: > > +j:0> journal.py 'Test. ABC ABC ABC.' > > Now I'm not sure what happens. The faulty one strips whitespace and > concatenates, (there doesn't seem to be nulls or anything separating the > arguments) yet python sees only a part of the argument. Have you set $IFS to $'\0'? Check with 'typeset -p IFS'.