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

Re: PATCH: Corrected style test in prediction



On Feb 23, 11:46am, Sven Wischnowsky wrote:
} Subject: Re: PATCH: Corrected style test in prediction
}
} Bart Schaefer wrote:
} 
} > Sven, please confirm ... I'm never sure about the number of trailing colons.
} > 
} > Index: Functions/Zle/predict-on
} > ===================================================================
} > -  elif zstyle -t ":completion:predict::::" list always
} > +  elif zstyle -t ":completion:::predict::" list always
} 
} The number of colons is still correct, but the original context name
} was correct, too. The `predict' was stored in the `function' field of
} the context name, indicating that completion was called from predict.

But in insert-and-predict we have:

	  local crs curcontext="${curcontext}"

          [[ -z "$curcontext" ]] && curcontext=:::
          curcontext="${curcontext#*:}predict:"

which makes the context be :completion:::predict::, with `predict' in
the `command' field.  Surely the two should be the same?  If not, why
not?

} However, the other call to zstyle had a missing colon, the one before
} the (not-given) tag.

Well, that part at least is less confusing now.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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