2013-03-23 12:41:32 -05:00
|
|
|
_rename_module()
|
|
|
|
{
|
|
|
|
local cur prev OPTS
|
|
|
|
COMPREPLY=()
|
|
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
2013-04-07 03:12:04 -05:00
|
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
|
|
case $prev in
|
|
|
|
'-h'|'--help'|'-V'|'--version')
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
2013-03-23 12:41:32 -05:00
|
|
|
case $cur in
|
|
|
|
-*)
|
2018-10-04 15:36:22 -05:00
|
|
|
OPTS="--verbose --symlink --help --version --no-act --no-override --interactive"
|
2013-03-23 12:41:32 -05:00
|
|
|
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
case $COMP_CWORD in
|
|
|
|
1)
|
|
|
|
COMPREPLY=( $(compgen -W "expression" -- $cur) )
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
COMPREPLY=( $(compgen -W "replacement" -- $cur) )
|
|
|
|
;;
|
|
|
|
*)
|
2013-09-30 08:49:00 -05:00
|
|
|
local IFS=$'\n'
|
2013-03-23 12:41:32 -05:00
|
|
|
compopt -o filenames
|
|
|
|
COMPREPLY=( $(compgen -f -- $cur) )
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
complete -F _rename_module rename
|