changeset 20134:bc9735855598

bash_completion: add global support for -B|--bookmark Previously, only -r|--rev was parsed globally which meant 'hg push -B <tab>' would try to complete a path instead of a bookmark.
author Sean Farley <sean.michael.farley@gmail.com>
date Tue, 26 Nov 2013 14:31:40 -0600
parents f6c33fc59dbd
children e39bd4b7be78
files contrib/bash_completion
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/bash_completion	Tue Nov 26 14:04:12 2013 -0600
+++ b/contrib/bash_completion	Tue Nov 26 14:31:40 2013 -0600
@@ -248,6 +248,13 @@
                 fi
                 return 1
             ;;
+            -B|--bookmark)
+                if [[ $canonical = 1 || status != "$cmd"* ]]; then
+                    _hg_bookmarks
+                    return 0
+                fi
+                return 1
+            ;;
         esac
     fi