diff contrib/bash_completion @ 9511:33033af09308

bash_completion: add completions for shelve extension
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 23 Sep 2009 21:29:47 -0500
parents b5e9ed63913b
children fc493cb90bb1
line wrap: on
line diff
--- 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
+}