bash - 为 Mercurial (hg) 启用 bash 选项卡补全

标签 bash ubuntu mercurial tab-completion

我已经在 ubuntu 上安装了 Mercurial (1.4.3-1),默认情况下它不会在 bash 中完成制表符。启用此功能的最简单方法是什么?

最佳答案

你需要

  • 为 Mercurial 安装最新的软件包,参见 Mercurial PPA .这将为您提供一个包含 Mercurial 完成代码的 /etc/bash_completion.d/mercurial 文件。您可以直接获取此文件以启用对 Mercurial 的完成支持。

您还可以为所有程序启用补全支持:

  • 安装bash-completion 包:aptitude install bash-completion

  • /etc/bash_completion 在你的 ~/.bashrc 文件中:

    # Use bash-completion, if available
    if [ -f /etc/bash_completion ]; then
      . /etc/bash_completion
    fi
    

    这将启用所有命令的完成,包括 Mercurial。

关于bash - 为 Mercurial (hg) 启用 bash 选项卡补全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7881584/

相关文章:

php - 在 bash 脚本中使用 for 和 if 循环

Ubuntu 中的 JAVA_HOME

mercurial - 你把钩子(Hook)的python代码放在​​哪里

version-control - 有没有办法将 Mercurial 存储库的范围移到一个文件夹上?

Mercurial merge/删除功能分支

linux - 如何排除 tar 的绝对路径?

linux - Bash 邮件 - 仅作为另一个用户发送

android - 为什么 PhoneGap/Cordova 不添加 android 平台?

android - 如何在 Linux 服务器(Ubuntu)上安装 Android 命令行工具

c++ - Linux Ubuntu 14.04, boost 库和线程编译