我希望能够打字
git checkout <start-of-branch-name>
...然后按下tab键,让分支名自动完成。我该如何启用此功能?
我希望能够打字
git checkout <start-of-branch-name>
...然后按下tab键,让分支名自动完成。我该如何启用此功能?
mkdir -p /etc/bash_completion.d/git
对吗?而且你必须从某个地方获取git自动完成目录/脚本... - rfayssh
,但git
的工作方式类似:https://unix.stackexchange.com/questions/136351/autocomplete-server-names-for-ssh-and-scp - Tamás Panyi/usr/share/bash-completion/completions/git
而不是/etc/bash_completion.d/git
。 - pedritogit-bash
,我的路径是 /mingw64/share/git/completion/
,它映射到 C:\Program Files\Git\mingw64\share\git\completion
。 - Tim Abell