Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2914

gitコマンドのエイリアスでも補完したい

$
0
0

前提

git-completion.bashを導入している.

方法

vim ~/path/to/your/.git-completion

こいつにエイリアスを登録してやるだけ.

__git_complete [alias] _git_command

みたいな感じ.
実際には

__git_complete git __git_main
__git_complete gitk  __gitk_main
# 以下にエイリアスに合わせた形式で追加
__git_complete cko _git_checkout
__git_complete br _git_br

こんな感じになる.


Viewing all articles
Browse latest Browse all 2914

Trending Articles