Reputation: 526
We have used the mercurial for our project. I am using hg via terminal for add, commit & push the changes.
While moving one branch to another branch i need autocomplete of branch names.
hg update reg<tab>
It should display the branch name and auto complete that name.
hg update registration
Please suggest is any way to achieve this approach.
Advance thanks !!
Upvotes: 1
Views: 1122
Reputation: 5746
If you have setup mercurial with brew and your version is recent you probably have a hg-completion.bash file in your install already.(Otherwise you can download a version here. (I suggest you rename it hg-completion.bash))
Edit your ~/.profile and ~/.bash_profile files and add the following lines :
if [ -f /PATH_TO_YOUR_COMPLETION_FILE/hg-completion.bash ]; then
. /PATH_TO_YOUR_COMPLETION_FILE/hg-completion.bash
fi
Open a new terminal tab and the autocompletion should work.
Upvotes: 3