aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorS.P.H <7786502+StaticPH@users.noreply.github.com>2021-11-03 17:15:06 -0400
committerJohn MacFarlane <jgm@berkeley.edu>2021-11-03 14:58:30 -0700
commitebe21f3f656c0fede2dacca0867d28893ba6f723 (patch)
treec4acf74779ccaa13ade96c23c033ecc5bdd529d0 /data
parentc256ef34b32308f00b64ca9cb01f1bacd5994802 (diff)
downloadpandoc-ebe21f3f656c0fede2dacca0867d28893ba6f723.tar.gz
Update bash_completion.tpl
- Specify local scope for highlight_styles; prevents global namespace pollution when sourcing completion from a file rather than adding `eval "$(pandoc --bash-completion)"` to .bashrc - Add argument completion for --print-highlight-style, --eol, and --markdown-headings
Diffstat (limited to 'data')
-rw-r--r--data/bash_completion.tpl12
1 files changed, 10 insertions, 2 deletions
diff --git a/data/bash_completion.tpl b/data/bash_completion.tpl
index d065c34bb..440abc3e6 100644
--- a/data/bash_completion.tpl
+++ b/data/bash_completion.tpl
@@ -4,7 +4,7 @@
_pandoc()
{
- local cur prev opts lastc informats outformats datafiles
+ local cur prev opts lastc informats outformats highlight_styles datafiles
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
@@ -57,10 +57,18 @@ _pandoc()
COMPREPLY=( $(compgen -W "section chapter part" -- ${cur}) )
return 0
;;
- --highlight-style)
+ --highlight-style|--print-highlight-style)
COMPREPLY=( $(compgen -W "${highlight_styles}" -- ${cur}) )
return 0
;;
+ --eol)
+ COMPREPLY=( $(compgen -W "crlf lf native" -- ${cur}) )
+ return 0
+ ;;
+ --markdown-headings)
+ COMPREPLY=( $(compgen -W "setext atx" -- ${cur}) )
+ return 0
+ ;;
*)
;;
esac