ZSH completion from script prompt (e.g. BASH read -e)

In the bash shell, you can ask the user for input and enable readline completion for the user with the -e flag. (e.g. read -e -p 'GET YOUR FILE: ' file will allow the user to use tabs to find the file.)

ZSH completion is more advanced and extensible, so I was hoping I could find a zsh inline that allowed this kind of behavior.

+4
source share
1 answer

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

 $ vared -c line 
+4
source

All Articles