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

Re: Completion function for bitkeeper?



On Nov 14, 10:47am, Peter Stephenson wrote:
} Subject: Re: Completion function for bitkeeper?
}
} Oliver Kiddle 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.

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

} I don't think we *need* both

Yes, we do.  There are uses for that splitting behavior.

} What about a single unquoted space to indicate no matches?  Why do we
} need the space at all?  Surely if there's nothing there it indicates no
} possible matches?  It's all a bit Zen-like.

There's a reason for that, too, but I'll have to dig in the archives a
bit to find it.



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