Frage

In a bash shell script you can prompt the user for input and enable readline completion for the user with the -e flag. (e.g. read -e -p 'GET YOUR FILE: ' file would allow a the user to use tab-completion to find the file.)

ZSH's completion is more advanced and extendable, so I hoped that I might be able to find a zsh builtin that allowed similar behavior.

War es hilfreich?

Lösung

I'm sure there's a better answer (I just recently started experimenting with zsh), but you can use vared.

$ vared -c line
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top