changeset 3476:13a9a2136dd7

bash_completion: make export fall back to tags when there's no mq patch applied
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 22 Oct 2006 01:01:42 -0300
parents 03932425cfd8
children e762c0e95eac
files contrib/bash_completion
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -193,7 +193,13 @@ shopt -s extglob
 	help)
 	    _hg_commands
 	;;
-	export|manifest|update)
+	export)
+	    if _hg_ext_mq_patchlist qapplied && [ "${COMPREPLY[*]}" ]; then
+		return 0
+	    fi
+	    _hg_tags
+	;;
+	manifest|update)
 	    _hg_tags
 	;;
 	pull|push|outgoing|incoming)
@@ -318,11 +324,6 @@ complete -o bashdefault -o default -F _h
     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur"))
 }
 
-_hg_cmd_export()
-{
-    _hg_ext_mq_patchlist qapplied
-}
-
 
 # hbisect
 _hg_cmd_bisect()