Patchwork [08,of,11,V3] bash_completion: add completion for deleting a shelve

login
register
mail settings
Submitter Sean Farley
Date Nov. 25, 2013, 5:42 p.m.
Message ID <a7932effc3c2c76dfc37.1385401341@dyn-160-39-236-172.dyn.columbia.edu>
Download mbox | patch
Permalink /patch/3128/
State Superseded
Commit da8fb88bd757f9e89d02c5a8a5f2391034c20294
Headers show

Comments

Sean Farley - Nov. 25, 2013, 5:42 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1385150321 18000
#      Fri Nov 22 14:58:41 2013 -0500
# Node ID a7932effc3c2c76dfc37bf70593b77b86bbaa3b5
# Parent  6644dbf7724e54ec0fe8d91f653942510e5f61d4
bash_completion: add completion for deleting a shelve

Patch

diff --git a/contrib/bash_completion b/contrib/bash_completion
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -602,11 +602,15 @@ 
     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$shelves' -- "$cur"))
 }
 
 _hg_cmd_shelve()
 {
-    _hg_status "mard"
+    if [[ "$prev" = @(-d|--delete) ]]; then
+        _hg_shelves
+    else
+        _hg_status "mard"
+    fi
 }
 
 _hg_cmd_unshelve()
 {
     _hg_shelves