求助:更新深度终端之后 apt install 无法自动补全
Tofloor
poster avatar
doublemagicxu
deepin
2016-12-22 09:51
Author


# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

Reply Favorite View the author
All Replies
avatar
huangwentao
deepin
2017-01-05 01:29
#1
顶,我也遇到了这问题,而且安装包名称也没法自动补全
Reply View the author
avatar
153******45
deepin
2017-01-05 01:59
#2
apt-get 可以,这个是补全脚本的锅,要自己去改配置文件
Reply View the author
avatar
A·S·M·X·T 😏😜
deepin
2017-01-05 03:05
#3
我的deepin apt也一直不行,但安装了debian9源的apt就可以
Reply View the author
avatar
huangwentao
deepin
2017-01-05 03:24
#4
https://bbs.deepin.org/post/133277
apt-get 可以,这个是补全脚本的锅,要自己去改配置文件

求指教一下怎么修改
Reply View the author
avatar
153******45
deepin
2017-01-05 03:25
#5
huangwentao 发表于 2017-1-4 19:24
求指教一下怎么修改

这个真不清楚


Reply View the author
avatar
A·S·M·X·T 😏😜
deepin
2017-01-05 03:53
#6
本帖最后由 liululin 于 2017-1-4 19:54 编辑
  1. echo -e "deb http://mirrors.ustc.edu.cn/debian/ testing main contrib non-free \ndeb-src http://mirrors.ustc.edu.cn/debian/ testing main contrib non-free" | sudo tee /etc/apt/sources.list.d/debian_testing.list
Copy the Code
  1. echo 'APT::Default-Release "unstable";' |sudo tee /etc/apt/apt.conf.d/98apt_default_sources.conf
Copy the Code
  1. sudo apt-get update
Copy the Code
  1. sudo apt-get install apt -t testing
Copy the Code
从debian9安装apt然后重启终端生效。。。。。。。。

https://bbs.deepin.org/post/133488

Reply View the author
avatar
huangwentao
deepin
2017-01-05 04:19
#7
我发现在终端里运行一下. /etc/bash_completion也可以的。
Reply View the author
avatar
huangwentao
deepin
2017-01-05 05:41
#8
找到了完美解决方法,
sudo vim /etc/bash.bashrc
可以看到下面的内容是被注释了的,把这些内容前面的#号去掉就回复可以自动补全了
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
Reply View the author
Comments
bingeneral
2017-09-16 04:45
正解
avatar
doublemagicxu
deepin
2017-04-07 23:18
#9
已解决,谢谢大家。
Reply View the author