Files
eos-bash-shared/eos-pkg-changelog.completion

29 lines
741 B
Bash

# bash completion for eos-pkg-changelog -*- shell-script -*-
_eos-pkg-changelog_complete() {
COMPREPLY=( $(compgen -W "$1" -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
compopt -o nosort
}
_eos-pkg-changelog_()
{
local cur prev #words cword split
_init_completion -s || return
case "$prev" in
-c | --clfile)
local files=(/etc/changelogs.conf.*)
_eos-pkg-changelog_complete "${files[*]}"
;;
*)
case "$cur" in
*)
_eos-pkg-changelog_complete "$(eos-pkg-changelog --parameters)"
;;
esac
;;
esac
}
complete -F _eos-pkg-changelog_ eos-pkg-changelog