[PATCH] bash_completion: add completions for shelve extension
Kevin Bullock
kbullock+mercurial at ringworld.org
Fri Sep 25 23:23:31 CDT 2009
# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1253759387 18000
# Node ID 7f691058d62965f55051f2a2b253d094a721f1ac
# Parent 32ec707991726bd58b9190862ab98f204797eea4
bash_completion: add completions for shelve extension
diff --git a/contrib/bash_completion b/contrib/bash_completion
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -530,3 +530,20 @@
return
}
+# shelve
+_hg_shelves()
+{
+ local shelves="$("$hg" unshelve -l . 2>/dev/null)"
+ local IFS=$'\n'
+ COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$shelves' -- "$cur"))
+}
+
+_hg_cmd_shelve()
+{
+ _hg_status "mard"
+}
+
+_hg_cmd_unshelve()
+{
+ _hg_shelves
+}
More information about the Mercurial-devel
mailing list