Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Two different zsh sessions handle $* differently
- X-seq: zsh-workers 41593
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Mikael Puhakka <mr.progo@xxxxxxxxx>
- Subject: Re: Two different zsh sessions handle $* differently
- Date: Thu, 24 Aug 2017 08:48:34 +0000
- Cc: zsh-workers@xxxxxxx, Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- 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 ==
- In-reply-to: <CAD1ad9a8ANsDWuptMxKNbMX=tLtah0TQyTZZKQeUQvus_9W+cA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAD1ad9bLy7cV8JByJcLg91ms1Eu27VDVQa8RA9H2Yf-tuBp4hA@mail.gmail.com> <20170823191739.GA35723@tower.spodhuis.org> <CAD1ad9a8ANsDWuptMxKNbMX=tLtah0TQyTZZKQeUQvus_9W+cA@mail.gmail.com>
Mikael Puhakka wrote on Thu, 24 Aug 2017 09:05 +0300:
> On 8/23/17, Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx> 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'.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author