4

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.

brent
  • 1,709
  • 2
  • 13
  • 15

1 Answers1

5

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

$ vared -c line
chepner
  • 497,756
  • 71
  • 530
  • 681