Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion function for bitkeeper?



Bart wrote:

> } > For '*:desc:{_foo}' style actions, this is run:
> } > 
> } >   eval "$action[@]"
> } > 
> } > and for '*:desc: _foo', this is run:
> } > 
> } >   eval "action=( $action )"
> } >   "$action[@]"
> } > 
> } > Can anyone tell me what practical difference that makes, if any?

> Word splitting is vastly different in the two cases.  It happens within
> the words of $action in the second case, but does not in the first case.

Really? As far as I can see, they both get exactly the same word
splitting:

% a=( print -l one two three\ four 'five\ six' )
% eval "$a[@]"
one
two
three
four
five six

% eval "b=( $a )"
% "$b[@]"
one
two
three
four
five six

> Also in the second example, only "alias -g" aliases are expanded.  Not
> that I think that was the intended behavior, but ...

That's odd. But, as we're using autoload -U, that has no effect on
_argumemts. 

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author