1 # autorandr/auto-disper completion by Maciej 'macieks' Sitarz <macieks@freesco.pl>
5 local cur prev opts lopts prfls
8 cur="${COMP_WORDS[COMP_CWORD]}"
9 prev="${COMP_WORDS[COMP_CWORD-1]}"
12 lopts="--help --change --save --load --default --force --fingerprint --config"
13 prfls="`find ~/.autorandr/* -maxdepth 1 -type d -printf '%f\n'`"
17 COMPREPLY=( $( compgen -W "${lopts}" -- $cur ) )
21 COMPREPLY=( $( compgen -W "${opts} ${lopts}" -- $cur ) )
25 if [ $COMP_CWORD -eq 1 ]; then
26 COMPREPLY=( $( compgen -W "${opts} ${lopts}" -- $cur ) )
32 -l|--load|-d|--default)
33 COMPREPLY=( $( compgen -W "${prfls}" ) )
42 complete -F _autorandr autorandr
43 complete -F _autorandr auto-disper