zoukankan      html  css  js  c++  java
  • 让centos使用ubuntu的make命令补全功能

    一直习惯使用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:

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

    centos:

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


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

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

  • 相关阅读:
    进度条
    html5 表单新增事件
    html5 表单的新增type属性
    html5 表单的新增元素
    html5 语义化标签
    jq 手风琴案例
    codeforces 702D D. Road to Post Office(数学)
    codeforces 702C C. Cellular Network(水题)
    codeforces 702B B. Powers of Two(水题)
    codeforces 702A A. Maximum Increase(水题)
  • 原文地址:https://www.cnblogs.com/i1022/p/11360223.html
Copyright © 2011-2022 走看看