[Level 1] autocomplete in shell script

#!/bin/bash
read -e -p 'input file name ( for auto complete): ' input_file
echo $input_file
$ ./autocomplete.sh
input file name ( for auto complete): /etc/ho<tab>
input file name ( for auto complete): /etc/host<enter>
/etc/host
$

Wish this helps.

regards,
Stanley Huang

Comments

Popular posts from this blog

[Level 2] Shell Interactive With Zenity Episode 5 -- list

[Level 2] iif in Python