Debian Codegraph @

etc/lf.bash

raw
1 # Autocompletion for bash shell.
2 #
3 # You may put this file to a directory used by bash-completion:
4 #
5 # mkdir -p ~/.local/share/bash-completion/completions
6 # ln -s "/path/to/lf.bash" ~/.local/share/bash-completion/completions
7 #
8
9 _lf () {
10 local -a opts=(
11 -command
12 -config
13 -cpuprofile
14 -doc
15 -last-dir-path
16 -log
17 -memprofile
18 -print-last-dir
19 -print-selection
20 -remote
21 -selection-path
22 -server
23 -single
24 -version
25 -help
26 )
27 if [[ $2 == -* ]]; then
28 COMPREPLY=( $(compgen -W "${opts[*]}" -- "$2") )
29 else
30 COMPREPLY=( $(compgen -f -d -- "$2") )
31 fi
32 }
33
34 complete -o filenames -F _lf lf lfcd