一直习惯使用debian、ubuntu做开发机,最近it要求各种安全加固,且只提供centos自动化脚本,而ubuntu版本比较乱,14、16、17都要自己整一遍太麻烦,索性换装centos7。

 

换了centos,首先感觉make命令不方便。

make有上百个目标,加一些繁琐的参数,在ubuntu可以用tab自动补全,在centos完全不行。(centos最小安装,已安装bash-completion)

比如有aaa,bbb,ccc……等目标,加congfig=xxxxx/yyyy,

在ubuntu只要输入:

make a[tab] config=x[tab][tab][tab]

在centos则需要全部手写:

make aaa config=xxxxx/yyyy

 

百度、bing一直没搜到ubuntu、centos在补全方面的讨论。

最后搜 bash-completion 原理,发现配置脚本在 /etc/bash_completion.d/,遂全部从ubuntu拷贝到centos,重新登陆,不生效。

因为没有make对应的补全脚本。


最后拐弯抹角才找到,系统有默认配置,在 /usr/share/bash-completion/completions/

ubuntu:

583

centos:

ls /usr/share/bash-completion/completions/|wc -l
192


差别巨大,难怪debian系的补全功能一直比较好用。

找到 /usr/share/bash-completion/completions/make 拷贝到centos,问题解决。

 

相关文章:

  • 2022-12-23
  • 2021-05-31
  • 2021-11-17
  • 2021-12-30
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
  • 2021-04-18
猜你喜欢
  • 2021-05-21
  • 2021-11-17
  • 2021-07-22
  • 2022-12-23
  • 2021-10-12
  • 2022-03-05
  • 2022-02-07
相关资源
相似解决方案