zsh-workers
 help / color / Atom feed
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Aryn Starr <whereislelouch@icloud.com>
Cc: zsh-workers@zsh.org
Subject: Re: Zargs bug
Date: Wed, 3 Jul 2019 19:05:58 +0100
Message-ID: <20190703180558.tq7hwgrtajgq35ds@chaz.gmail.com> (raw)
In-Reply-To: <F49F336B-CAA1-4992-B7EF-E6D04763CF4E@icloud.com>

2019-07-03 22:08:04 +0430, Aryn Starr:
> I run this line:
> 
> $ zargs -t -i _ -- ceer whh -- compdef _=which
> compdef ceer=which
> compdef whh=which
> 
> But the completions don’t activate. When I manually run
> ‘compdef ceer=which’, though, it works flawlessly. 
[...]

zargs runs the commands in a subshell, so they can't affect the
current shell environment.

Same as if you'd run:

(compdef ceer=which)

AFAICT, it's not documented but the code of zargs has:

# Everything has to be in a subshell just in case of backgrounding jobs,
# so that we don't unintentionally "wait" for jobs of the parent shell.

-- 
Stephane

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 17:38 Aryn Starr
2019-07-03 18:05 ` Stephane Chazelas [this message]
2019-07-03 18:27   ` Aryn Starr

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=20190703180558.tq7hwgrtajgq35ds@chaz.gmail.com \
    --to=stephane.chazelas@gmail.com \
    --cc=whereislelouch@icloud.com \
    --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

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git