没有 root 权限怎么安装 bash-completion
公司服务器没有 root 权限用起来确实比较难受。
我们今天来安装 bash-completion。
- 下载 bash-completion 源码
wget https://github.com/scop/bash-completion/releases/download/2.11/bash-completion-2.11.tar.xz
- 解压
tar -xvf bash-completion-2.11.tar.xz
- 进入目录
cd bash-completion-2.11
- (optional) autoreconf
autoreconf -i # if not installing from prepared release tarball
- 修改 config 目录和 data 目录,原来为
/etc
和/local/share
./configure --sysconfdir=$HOME/.config --datadir=$HOME/.local/share
- 执行安装
make # GNU make required
make check # optional
make install # as root
make installcheck # optional, requires python3 with pytest >= 3.6, pexpect