summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2016-10-21 16:40:04 +0200
committerJean Delvare <jdelvare@suse.de>2016-10-21 16:40:04 +0200
commitd6ec084d1b62302a377fa5a1d4d968c71dbafdab (patch)
tree8c6be39714b7a048bef4ca6c263df8fecaf4d412
parent833ba7e93e7ab14cfb259735e541dc6c0b0ddafe (diff)
downloadquilt-d6ec084d1b62302a377fa5a1d4d968c71dbafdab.tar.gz
bash_completion: Improve the handling of the mail command
Some options need a parameter, invite the user to provide it.
-rw-r--r--bash_completion15
1 files changed, 14 insertions, 1 deletions
diff --git a/bash_completion b/bash_completion
index 11b6acd..78e4e77 100644
--- a/bash_completion
+++ b/bash_completion
@@ -159,7 +159,20 @@ _quilt_completion()
esac
;;
mail)
- COMPREPLY=( $( compgen -W "-m -M --prefix --mbox --send --sender --from --subject --to --cc --bcc --signature --reply-to -h" -- $cur ) )
+ case $prev in
+ --mbox|-M)
+ _quilt_comfile
+ ;;
+ --signature)
+ _quilt_comfile
+ COMPREPLY=( "${COMPREPLY[@]}" - )
+ ;;
+ --prefix|--sender|--from|--subject|--to|--cc|--bcc|--charset|--reply-to)
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W "-m -M --prefix --mbox --send --sender --from --subject --to --cc --bcc --charset --signature --reply-to -h" -- $cur ) )
+ ;;
+ esac
;;
next|previous)
COMPREPLY=( $( compgen -W "$(quilt --quiltrc - series) -h" -- $cur ) )