1# This script enables bash autocompletion for pandoc. To enable
2# bash completion, add this to your .bashrc:
3# eval "$(pandoc --bash-completion)"
7 local cur prev opts lastc informats outformats datadir
9 cur="${COMP_WORDS[COMP_CWORD]}"
10 prev="${COMP_WORDS[COMP_CWORD-1]}"
12 # These should be filled in by pandoc:
21 COMPREPLY=( $(compgen -W "${informats}" -- ${cur}) )
24 --to|-t|--write|-w|-D|--print-default-template)
25 COMPREPLY=( $(compgen -W "${outformats}" -- ${cur}) )
29 COMPREPLY=( $(compgen -W "references javascript none" -- ${cur}) )
33 COMPREPLY=( $(compgen -W "pdflatex lualatex xelatex wkhtmltopdf weasyprint prince context pdfroff" -- ${cur}) )
36 --print-default-data-file)
37 COMPREPLY=( $(compgen -W "reference.odt reference.docx $(find ${datadir} | sed -e 's/.*\/data\///')" -- ${cur}) )
41 COMPREPLY=( $(compgen -W "auto none preserve" -- ${cur}) )
45 COMPREPLY=( $(compgen -W "accept reject all" -- ${cur}) )
49 COMPREPLY=( $(compgen -W "block section document" -- ${cur}) )
53 COMPREPLY=( $(compgen -W "section chapter part" -- ${cur}) )
57 COMPREPLY=( $(compgen -W "${highlight_styles}" -- ${cur}) )
66 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
71 COMPREPLY=( $(compgen -X '' -f "${cur}") )
78complete -o filenames -o bashdefault -F _pandoc pandoc
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list