bash_completion: add completions for shelve extension
authorKevin Bullock <kbullock@ringworld.org>
Wed, 23 Sep 2009 21:29:47 -0500
changeset 9511 33033af09308
parent 9510 8bd669948b2e
child 9512 e7bde4680eec
bash_completion: add completions for shelve extension
contrib/bash_completion
--- a/contrib/bash_completion	Thu Oct 01 11:40:53 2009 +0200
+++ b/contrib/bash_completion	Wed Sep 23 21:29:47 2009 -0500
@@ -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
+}