Reputation: 1729
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.
Upvotes: 4
Views: 662
Reputation: 530853
I'm sure there's a better answer (I just recently started experimenting with zsh
), but you can use vared
.
$ vared -c line
Upvotes: 5