Patchwork [08,of,15,V5] bash_completion: add completion for deleting a shelve

login
register
mail settings
Submitter Sean Farley
Date Nov. 26, 2013, 7:54 p.m.
Message ID <70c10d48886307fd9dcc.1385499287@laptop.local>
Download mbox | patch
Permalink /patch/3161/
State Accepted
Commit da8fb88bd757f9e89d02c5a8a5f2391034c20294
Headers show

Comments

Sean Farley - Nov. 26, 2013, 7:54 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 70c10d48886307fd9dcc4960194cac9e7905236c
# Parent  8b0995d7a74888b1d9f156f35d64a43833362ccd
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