[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 1] Rar tool for Solaris.

[Level 2] iif in Python