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

Re: Two Questions



* Peter Stephenson <pws@xxxxxxx> [Mar 02, 2004 12:40]:
> > [= not being taken into account]
>
> This seems to be a fully paid up bug...  I think it's simply that
> this chunk in _main_complete isn't testing for the option before
> trying to make `=' special.  (Leading `=' should now work regardless
> of magicequalsubst --- it seems that's already smart enough to match
> a non-leading `='.)
>
> Index: Completion/Base/Core/_main_complete
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Completion/Base/Core/_main_complete,v
> retrieving revision 1.8
> diff -u -r1.8 _main_complete
> --- Completion/Base/Core/_main_complete	1 Aug 2003 16:29:21 -0000	1.8
> +++ Completion/Base/Core/_main_complete	2 Mar 2004 11:24:04 -0000
> @@ -57,7 +57,7 @@
>  # Special completion contexts after `~' and `='.
>
>  if [[ -z "$compstate[quote]" ]]; then
> -  if compset -P 1 '='; then
> +  if [[ -o equals ]] && compset -P 1 '='; then
>      compstate[context]=equal
>    elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then
>      compset -p 1

Aw nice.  This was what I tried doing, but I did
  if compset -P 1 '=' && [[ -o equals ]]; then
instead (and I hadn't done the compdef from the previous mail either).

Works like a charm, thanks!
	nikolai

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}



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