3# This script enables bash autocompletion for pandoc. To enable
4# bash completion, add this to your .bashrc:
5# eval "$(pandoc --bash-completion)"
9 local cur prev opts lastc informats outformats datadir
11 cur="${COMP_WORDS[COMP_CWORD]}"
12 prev="${COMP_WORDS[COMP_CWORD-1]}"
14 # These should be filled in by pandoc:
22 COMPREPLY=( $(compgen -W "${informats}" -- ${cur}) )
25 --to|-t|--write|-w|-D|--print-default-template)
26 COMPREPLY=( $(compgen -W "${outformats}" -- ${cur}) )
30 COMPREPLY=( $(compgen -W "references javascript none" -- ${cur}) )
34 COMPREPLY=( $(compgen -W "pdflatex lualatex xelatex" -- ${cur}) )
37 --print-default-data-file)
38 COMPREPLY=( $(compgen -W "reference.odt reference.docx $(find ${datadir} | sed -e 's/.*\/data\///')" -- ${cur}) )
42 COMPREPLY=( $(compgen -W "pygments tango espresso zenburn kate monochrome haddock" -- ${cur}) )
51 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
55 COMPREPLY=( $(compgen -f ${cur}) )
62complete -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