diff options
author | dakkar <dakkar@thenautilus.net> | 2021-04-11 17:19:14 +0100 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2021-04-11 17:19:14 +0100 |
commit | 219df667c9e2a7a30a5babdb84e2f0bba5b73388 (patch) | |
tree | 747f1fd8c6067529ea85c591708b25e7de975835 /.bash_completion.d | |
parent | no more hal-automounter, use dmount (diff) | |
download | dotfiles-219df667c9e2a7a30a5babdb84e2f0bba5b73388.tar.gz dotfiles-219df667c9e2a7a30a5babdb84e2f0bba5b73388.tar.bz2 dotfiles-219df667c9e2a7a30a5babdb84e2f0bba5b73388.zip |
make my bashcomp actually work
Diffstat (limited to '.bash_completion.d')
-rw-r--r-- | .bash_completion.d/dmount.bashcomp | 7 | ||||
-rw-r--r-- | .bash_completion.d/mupdf.bashcomp | 25 | ||||
-rw-r--r-- | .bash_completion.d/pd.bashcomp | 2 | ||||
l--------- | .bash_completion.d/website.bashcomp | 1 |
4 files changed, 35 insertions, 0 deletions
diff --git a/.bash_completion.d/dmount.bashcomp b/.bash_completion.d/dmount.bashcomp new file mode 100644 index 0000000..adbd251 --- /dev/null +++ b/.bash_completion.d/dmount.bashcomp @@ -0,0 +1,7 @@ +# -*- mode: sh -*- + +_dmount_list() { + COMPREPLY=( $(dmount --list) ) +} + +complete -F _dmount_list dmount diff --git a/.bash_completion.d/mupdf.bashcomp b/.bash_completion.d/mupdf.bashcomp new file mode 100644 index 0000000..dd02b65 --- /dev/null +++ b/.bash_completion.d/mupdf.bashcomp @@ -0,0 +1,25 @@ +# mupdf(1) completion -*- shell-script -*- + +_mupdf() +{ + local cur prev words cword split + _init_completion -s || return + + case $prev in + --help*|-h|-p|-r|-W|-H|-S|-U|-x) + return + ;; + esac + + $split && return + + if [[ $cur == -* ]]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' \ + -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + return + fi + + _filedir '@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2|.xz|.XZ)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|epub)' +} && +complete -F _mupdf mupdf diff --git a/.bash_completion.d/pd.bashcomp b/.bash_completion.d/pd.bashcomp new file mode 100644 index 0000000..4eb8044 --- /dev/null +++ b/.bash_completion.d/pd.bashcomp @@ -0,0 +1,2 @@ +_xfunc perl _perldoc +complete -F _perldoc -o bashdefault pm pd diff --git a/.bash_completion.d/website.bashcomp b/.bash_completion.d/website.bashcomp new file mode 120000 index 0000000..cd8d05a --- /dev/null +++ b/.bash_completion.d/website.bashcomp @@ -0,0 +1 @@ +/home/dakkar/website/thenautilus/website.bashcomp
\ No newline at end of file |