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

Re: implementing a control for completing filenames with a defined list of tokens



On Mar 16, 12:27pm, Bart Schaefer wrote:
}
}     _tokens() {
}       if [[ $PREFIX$SUFFIX = *__* ]]; then
}         compadd ${PREFIX%_#}${^${(f)"$(<tokenfile)"}}${SUFFIX#_#}

Apologies, that needs to be ${PREFIX%%_#} and ${SUFFIX##_#} to get all
the underscores.



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