Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Problem with 'env' completion (was: Using another command's completion function with an alias)
- X-seq: zsh-users 14564
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Problem with 'env' completion (was: Using another command's completion function with an alias)
- Date: Thu, 12 Nov 2009 14:51:12 -0500 (EST)
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
On Thu, 12 Nov 2009, Benjamin R. Haskell wrote:
> [...]
>
> alias noagent='env -u SSH_AGENT_PID -u SSH_AUTH_SOCK'
>
> But, compdef noagent=-command- doesn't have the desired effect. I
> instead get the completion for 'env':
>
> $ noagent <C-x><h>
> tags in context :completion::complete:-u::
> all-files (_files _default (eval))
> tags in context :completion::complete:env::
> argument-rest (_arguments _env (eval))
Upon further tinkering, I think this might (additionally) be a problem
with the completion for 'env'...
It doesn't seem to like more than one '-u' argument:
$ env -u <C-x><h>
tags in context :completion::complete:env::
option-u-1 (_arguments _env (eval))
$ env -u SSH_AUTH_SOCK -u <C-x><h>
tags in context :completion::complete:-u::
all-files (_files _default (eval))
tags in context :completion::complete:env::
argument-rest (_arguments _env (eval))
But (as an example showing that multiple '-u' args are fine):
$ export A=1 B=2
$ env | grep '^[A-Z]='
A=1
B=2
$ env -u A | grep '^[A-Z]='
B=2
$ env -u A -u B | grep '^[A-Z]='
$
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author