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

Re: Tests of interrupting completion, and completion_nostat_dirs



On Feb 5,  8:56am, Greg Klanderman wrote:
}
} >>>>> On February 5, 2014 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} 
} > I think I'd have ztat() call getaparam() rather than declare
} > a C array tied to a special variable (compare the way zle_refresh.c
} > handles zle_highlight) but I'll stop at that.
} 
} Thank you Bart, the only downside I see is that I currently use the
} existence of the special variable to decide whether to configure the
} automount points in the fake-files zstyle [...]
} 
} If I use getaparam, is the only way to test if the feature exists with
} a ZSH_VERSION / ZSH_PATCHLEVEL check?  Do we have any mechanism for
} creating named features to test against?

You could declare it as a provided feature in the zsh/complete module,
and test for it with "zmodload -l ...".  I'm not sure whether you can
declare that a module has a "p:" (parameter) feature but not have any
real special parameter to go with it ...

On Feb 5,  2:23pm, Peter Stephenson wrote:
}
} Looks like the right answer is to add the parameter within
} complete.c.

And declare it as a feature to solve Greg's problem above?  If it's only
a special parameter when completion is actually in progress, it can't be
tested from a startup file.



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