[PATCH 13 of 15 V5] bash_completion: add global support for -B|--bookmark
Sean Farley
sean.michael.farley at gmail.com
Tue Nov 26 13:54:52 CST 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1385497900 21600
# Tue Nov 26 14:31:40 2013 -0600
# Node ID 9978ec49c0eb4a9fbfd0ce6f973da184a0053037
# Parent 58efbd280c39addee05fe06175989da96823efd0
bash_completion: add global support for -B|--bookmark
Previously, only -r|--rev was parsed globally which meant 'hg push -B <tab>'
would try to complete a path instead of a bookmark.
diff --git a/contrib/bash_completion b/contrib/bash_completion
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -246,10 +246,17 @@
_hg_labels
return 0
fi
return 1
;;
+ -B|--bookmark)
+ if [[ $canonical = 1 || status != "$cmd"* ]]; then
+ _hg_bookmarks
+ return 0
+ fi
+ return 1
+ ;;
esac
fi
local aliascmd=$(_hg_cmd showconfig alias.$cmd | awk '{print $1}')
[ -n "$aliascmd" ] && cmd=$aliascmd
More information about the Mercurial-devel
mailing list