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

Re: zsh completion with _files



On Oct 7,  5:43pm, Cornelius Kolbel wrote:
}
} If the user types a "@" this marks that after the at-sign filenames are
} allowed to be entered.
} So I need to check the current word and compare it accordingly.

You're probably looking for

    compset -P '*@'

Look at the manual section on "Completion Builtin Commands".  _arguments
et al. will handle calling "compadd" for you in most cases, but you have
to set up the prefixes and suffixes if there are words (in the zsh syntax
sense) from which you want to complete substrings.



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