changeset 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 8bd669948b2e
children e7bde4680eec
files contrib/bash_completion
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
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
+}