diff contrib/bash_completion @ 9602:fc493cb90bb1

Merge with redone c655432c2c24 (issue1860)
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 16 Oct 2009 11:19:39 +0200
parents 552c5a5a3502 33033af09308
children 18d5935c0c62
line wrap: on
line diff
--- a/contrib/bash_completion	Fri Oct 16 11:18:38 2009 +0200
+++ b/contrib/bash_completion	Fri Oct 16 11:19:39 2009 +0200
@@ -546,3 +546,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
+}