| Server IP : 50.21.180.56 / Your IP : 216.73.216.208 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : ws67922704 ( 67922704) PHP Version : 8.5.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /kunden/usr/share/bash-completion/completions/ |
Upload File : |
# carton(3pm) completion -*- shell-script -*-
_comp_cmd_carton__commands()
{
local cmds=$("$1" usage 2>&1 |
command sed -ne '/.*command.* is one of/{n;p;q;}')
_comp_compgen -aF $' \t\n,' -- -W "$cmds"
}
_comp_cmd_carton__command_help()
{
local help=$(PERLDOC_PAGER=cat PERLDOC=-otext "$1" -h "$2" 2>&1)
_comp_compgen -a -- -W '$help'
}
_comp_cmd_carton()
{
local cur prev words cword was_split comp_args
_comp_initialize -s -- "$@" || return
local i command="" has_command=""
for ((i = 1; i < cword; i++)); do
case ${words[i]} in
-*) ;;
*)
command=${words[i]}
has_command=set
break
;;
esac
done
if [[ ! $has_command ]]; then
_comp_cmd_carton__commands "$1"
return
fi
case $prev in
--version | --help | -[vh])
return
;;
--cpanfile)
if [[ $command == install ]]; then
_comp_compgen_filedir
return
fi
;;
--path)
if [[ $command == install ]]; then
_comp_compgen_filedir -d
return
fi
;;
--without)
if [[ $command == install ]]; then
local phases="configure build test runtime develop"
_comp_compgen -a -- -W '$phases'
return
fi
;;
esac
[[ $was_split ]] && return
if [[ $cur == -* ]]; then
[[ $command == @(help|usage) ]] || COMPREPLY=(--help)
_comp_cmd_carton__command_help "$1" "$command"
fi
case $command in
exec)
# skip all the options --, -v, etc. and identify the command name
# position.
for ((i++; i < cword; i++)); do
case ${words[i]} in
--)
((i++))
break
;;
-*) ;;
*) break ;;
esac
done
_comp_command_offset "$i"
return
;;
show | update)
: # TODO modules completion
;;
esac
} &&
complete -F _comp_cmd_carton carton
# ex: filetype=sh