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

Re: Autocomplet with compdef _precommand



On Aug 31,  2:35am, Daniel Shahaf wrote:
} Subject: Re: Autocomplet with compdef _precommand
}
} Bart Schaefer wrote on Tue, Aug 30, 2016 at 10:56:36 -0700:
} > Question for zsh-workers:  Is it worth adding a style to _precommand
} > to selectively turn off autocd?  If so, what should it be called?
} 
} Isn't that already possible? -
} 
}     zstyle -e :completion::complete:-command-:: tag-order \
}       '(( $precommands[(I)start] )) && reply=("!local-directories" -)'

It would be nice not to need to use -e and to know about $precommands.
E.g. I was asking about something like

    zstyle :completion::complete:precommand-start:: autocd off

Or perhaps

    zstyle :completion::complete:precommand-start:: localoptions noautocd

which would be a more generic style name that other cases might use. But
what to make the context is also a problem.



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