Useful Mercurial aliases
#!/bin/bash
# Copy the name of the current branch to the clipboard
alias hgb="hg branch | \
tr -d '\n' | \
xclip -selection clipboard && \
echo \"$(xclip -selection clipboard -o)\" "
# Show all branches in a more readable way
alias hgbs="hg branches | \
column -t | \
sort"
# Same as hgbs, but additionally shows closed branches
alias hgbsc="hg branches -c | \
column -t | \
sort"
# Copy branch/changeset information to the clipboard.
# Useful when referring to commits
alias hglc="hg log -l 1 | \
grep -1 changeset | \
xclip -selection clipboard"
Written by Ben Ripkens
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#