How do I get bash completion to work with aliases?

后端 未结 12 1046
温柔的废话
温柔的废话 2020-11-28 00:35

Case in point:

I\'m a on mac with bash v3.2.17, I\'m using git installed via macports with the bash_completion variant.

When I type git checkout m<

12条回答
  •  [愿得一人]
    2020-11-28 01:21

    You could also try using Git aliases. For example, in my ~/.gitconfig file, I have a section that looks like this:

    [alias]
            co = checkout
    

    So you could type git co m, and that should expand to git co master, which is the git checkout command.

提交回复
热议问题