/etc/bash_completion.d/cme is in libconfig-model-perl 2.021-3+deb7u1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | # cme(1) completion
#
#
# This file is part of Config-Model
#
# This software is Copyright (c) 2011 by Dominique Dumont
#
# This is free software, licensed under:
#
# The GNU Lesser General Public License, Version 2.1, February 1999
#
_cme_models()
{
MODELS=$(perl -MConfig::Model::Lister -e'print Config::Model::Lister::models;')
COMPREPLY=( $( compgen -W "$MODELS" -- $cur ) )
}
_cme_appli()
{
MODELS=$(perl -MConfig::Model::Lister -e'print Config::Model::Lister::applications;')
COMPREPLY=( $( compgen -W "$MODELS" -- $cur ) )
}
_cme_commands()
{
COMPREPLY=( $( compgen -W 'list check migrate fix modify search edit dump fusefs' -- $cur ) )
}
_cme()
{
local cur
COMPREPLY=()
_get_comp_words_by_ref -n : cur prev
global_options='-application -model -ui -dev -model-dir -root-dir -force-load -backend -dump -dumptype -load -save -fuse-dir -search -narrow-search'
if [[ $COMP_CWORD -eq 1 ]] ; then
_cme_commands
elif [[ $COMP_CWORD -eq 2 ]] ; then
_cme_appli
else
case $prev in
multistrap)
COMPREPLY=( $( compgen -o filenames -G "$cur*.conf" ) )
;;
-ui)
COMPREPLY=( $( compgen -W 'none tk curses shell fuse' -- $cur ) )
;;
-dumptype)
COMPREPLY=( $( compgen -W 'full preset custom' -- $cur ) )
;;
-model-dir|-root-dir|-fuse-dir)
_filedir -d
;;
*)
case ${COMP_WORDS[1]} in
edit)
COMPREPLY=( $( compgen -W "$global_options -ui -open-item" -- $cur ) )
;;
# modify completion could be much more elaborate...
list|check|migrate|fix|modify)
COMPREPLY=( $( compgen -W "$global_options" -- $cur ) )
;;
search)
COMPREPLY=( $( compgen -W "$global_options -search -narrow-search" -- $cur ) )
;;
dump)
COMPREPLY=( $( compgen -W "$global_options -dump-type" -- $cur ) )
;;
fusefs)
COMPREPLY=( $( compgen -W "$global_options -fuse-dir -dfuse" -- $cur ) )
;;
esac
esac
fi
}
complete -F _cme cme
|