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

Completion after anonymous function



«() {} <TAB>» completes as a command position:

% () {} «_complete_help»
tags in context :completion::complete:-command-::
    commands builtins functions aliases suffix-aliases reserved-words jobs parameters  (_command_names _autocd) 
    commands                                                                           (_path_commands _command_names _autocd) 
    jobs                                                                               (_jobs _command_names _autocd) 
    parameters                                                                         (_parameters _command_names _autocd)

I guess it should just use _default, like unrecognised command words.

Tracing, _complete sees [[ $compstate[context] == normal ]] — which
seems correct — and then the «if [[ CURRENT -eq 1 ]]» in _normal is
entered; I guess that's the problem?



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