深度中端执行历史问题
Tofloor
poster avatar
blue
deepin
2014-01-10 18:44
Author
为什么中端不能记住执行命令,不能调出历史命令(现在向上键只有二条命令:ls,sudo apt-get install google-earth);刚才执行的“gsettings set com.deepin.dde.dock active-mini-mode true”(为什么这个功能不在桌面设置里面实现??),关掉中端再重启,这个看不到了,只能重新输入。

另外,用apt-get安装软件包时,相用tab补全时,竞提示有几千还是几万条,是否显示,回Y后,发现开始一页根本就不是相关的东西。
Reply Favorite View the author
All Replies
electricface
deepin
2014-01-10 18:53
#1
bash 补全就是这样,通过一个bash 函数得到了 软件列表,然后结果有几万条,为了良好的体验,当然不会一次性列出,你需要输入更加完整的 软件名,它筛选出的结果就会更少一些,少于一定的数值(可以自己配置)就会一次性显示出来。

查看bash 命令输入历史,使用命令 history,重复历史命令, !加上编号
比如
  1. deepin@deepin:~$ history
  2.     1  top
  3.     2  ls
  4.     3  history
  5.     4  top
  6.     5  history
  7.     6  top
  8.     7  l
  9.     8  history
  10. deepin@deepin:~$ !2
  11. ls
  12. 公共的  模板  视频  图片  文档  下载  音乐  桌面
Copy the Code
重复上一条历史命令是 !!

bash 只有在正常退出的时候会将 命令记录追加到 ~/.bash_history 文件,每次bash 启动时才会读取一次 ~/.bash_history 文件,命令以空格开头是不计入历史命令的。
Reply View the author
blue
deepin
2014-01-10 19:06
#2
谢谢
Reply View the author
blue
deepin
2014-01-10 19:18
#3
刚刚试了一下,发现基本上直接关闭中端时(窗体上的关闭按钮),.bash_history文件不发生变化,使用exit退出历史记录会保存到该文件
Reply View the author
electricface
deepin
2014-01-10 21:59
#4
我用 watch cat ~/.bash_history 监视文件变化,发现即使通过窗体上关闭按钮关闭 bash ,也是会将历史命令追加到 ~/.bash_history 中。
Reply View the author
blue
deepin
2014-01-10 22:19
#5
我的好像不行,要用EXIT才会保存到~/.bash_history中。直接关闭不会更新该文件。

我用的是2013版
Reply View the author
electricface
deepin
2014-01-10 22:45
#6
我一般是按 Ctrl+D 关闭终端的,你试试

我知道了,这个bug是偶然发生的。
Reply View the author