0

I want to enter location of file in bash, like this :

while [[ ! -f "$location" ]]; do
   read -p "Enter application location : " location
done

Can I use TAB to autofill location like enter path in terminal. Can it done? How to do it?

sownt
  • 1
  • 2

1 Answers1

0

Simply use -e switch:

while [[ ! -f "$location" ]]; do
   read -ep "Enter application location >>> " location
done
Gilles Quenot
  • 154,891
  • 35
  • 213
  • 206