OpenWRT安装bash及bash-completion:
#https://www.haiyun.me
opkg update
opkg install bash-completion
更改用户shell为bash:
cat /etc/passwd
root:AABBBDDDdDDDDDDDDDD42fmHU/:0:0:root:/root:/bin/bash
配置bash-completion命令参数补全:
echo '. /etc/bash_completion' >> /etc/bashrc
在使用命令补全时如出现以下错误:
-bash: /dev/fd/60: No such file or directory
创建/dev/fd链接:
ln -s /proc/self/fd /dev/fd