From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Mikael Puhakka <mr.progo@gmail.com>
Cc: zsh-workers@zsh.org,
Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
Subject: Re: Two different zsh sessions handle $* differently
Date: Thu, 24 Aug 2017 08:48:34 +0000 [thread overview]
Message-ID: <1503564514.1008441.1083427592.72F40F32@webmail.messagingengine.com> (raw)
In-Reply-To: <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@spodhuis.org> 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'.
next prev parent reply other threads:[~2017-08-24 8:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 17:22 Mikael Puhakka
2017-08-22 18:40 ` Eitan Adler
2017-08-22 19:04 ` Daniel Shahaf
2017-08-22 19:19 ` Eitan Adler
2017-08-22 19:04 ` Mikael Puhakka
2017-08-23 19:17 ` Phil Pennock
2017-08-24 6:05 ` Mikael Puhakka
2017-08-24 8:48 ` Daniel Shahaf [this message]
2017-08-24 9:07 ` Mikael Puhakka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503564514.1008441.1083427592.72F40F32@webmail.messagingengine.com \
--to=d.s@daniel.shahaf.name \
--cc=mr.progo@gmail.com \
--cc=zsh-workers+phil.pennock@spodhuis.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).