vim ~/.bashrc
add the aliases. Mine were:
Windows
Linux
Execute the file to make the changes work:. ~/.bashrc
From:
http://githowto.com/aliases
http://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias
Add alias auto completion:
Now its time for adding the auto completion to your alias:
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
mv git-completion.bash .git-completion.bash
vim .bash_profile
Add the following content to the file:
# add alies auto completion
source ~/.git-completion.bash
__git_complete gch _git_checkout
__git_complete gb _git_branch
__git_complete gmn _git_merge
Now just reboot shell and enjoy your auto completion :)
From:
http://stackoverflow.com/questions/342969/how-do-i-get-bash-completion-to-work-with-aliases
No comments:
Post a Comment