fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
5dc07c9e7
master
1# Fish Shell command-line completions for Test Kitchen 2 3function __fish_kitchen_no_command -d'Test if kitchen has yet to be given the main command' 4set -l cmd( commandline -xpc) 5test ( count $cmd ) -eq 1 6end 7 8function __fish_kitchen_using_command 9set -l cmd( commandline -xpc) 10set -q cmd[ 2 ] ;and test " $argv [ 1 ] " = $cmd [ 2 ] 11end 12 13function __fish_kitchen_list 14command kitchen list --bare 15end 16 17# help commands 18complete -c kitchen -f -n __fish_kitchen_no_command -a help -d"Describe available commands or one specific command" 19 20# help help 21complete -c kitchen -f -n'__fish_kitchen_using_command help' -a help -d"Describe available commands or one specific command" 22 23# list commands 24complete -c kitchen -f -n __fish_kitchen_no_command -a list -d"Lists one or more instances" 25complete -c kitchen -f -n'__fish_kitchen_using_command list' -s b -l bare -d"List the name of each instance only, one per line" 26complete -c kitchen -f -n'__fish_kitchen_using_command list' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 27 28# list help 29complete -c kitchen -f -n'__fish_kitchen_using_command help' -a list -d"Lists one or more instances" 30 31# list instance-based commands 32complete -c kitchen -f -n'__fish_kitchen_using_command list' -a'(__fish_kitchen_list)' 33 34# diagnose commands 35complete -c kitchen -f -n __fish_kitchen_no_command -a diagnose -d"Show computed diagnostic configuration" 36complete -c kitchen -f -n'__fish_kitchen_using_command diagnose' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 37complete -c kitchen -f -n'__fish_kitchen_using_command diagnose' -l loader -d"Include data loader diagnostics" 38complete -c kitchen -f -n'__fish_kitchen_using_command diagnose' -l instances -d"Include instances diagnostics" 39complete -c kitchen -f -n'__fish_kitchen_using_command diagnose' -l all -d"Include all diagnostics" 40 41# diagnose help 42complete -c kitchen -f -n'__fish_kitchen_using_command help' -a diagnose -d"Show computed diagnostic configuration" 43 44# diagnose instance-based commands 45complete -c kitchen -f -n'__fish_kitchen_using_command diagnose' -a'(__fish_kitchen_list)' 46 47# create commands 48complete -c kitchen -f -n __fish_kitchen_no_command -a create -d"Change instance state to create. Start one or more instances" 49complete -c kitchen -f -n'__fish_kitchen_using_command create' -s c -l concurrency -d"Run concurrently, give number for max instances" 50complete -c kitchen -f -n'__fish_kitchen_using_command create' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 51 52# create help 53complete -c kitchen -f -n'__fish_kitchen_using_command help' -a create -d"Change instance state to create. Start one or more instances" 54 55# create instance-based commands 56complete -c kitchen -f -n'__fish_kitchen_using_command create' -a'(__fish_kitchen_list)' 57 58# converge commands 59complete -c kitchen -f -n __fish_kitchen_no_command -a converge -d"Change instance state to converge. Use a provisioner to configure one or more instances" 60complete -c kitchen -f -n'__fish_kitchen_using_command converge' -s c -l concurrency -d"Run converge concurrently, give number for max instances" 61complete -c kitchen -f -n'__fish_kitchen_using_command converge' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 62 63# converge help 64complete -c kitchen -f -n'__fish_kitchen_using_command help' -a converge -d"Change instance state to converge. Use a provisioner to configure one or more instances" 65 66# converge instance-based commands 67complete -c kitchen -f -n'__fish_kitchen_using_command converge' -a'(__fish_kitchen_list)' 68 69# setup commands 70complete -c kitchen -f -n __fish_kitchen_no_command -a setup -d"Change instance state to setup. Prepare to run automated tests. Install busser" 71complete -c kitchen -f -n'__fish_kitchen_using_command setup' -s c -l concurrency -d"Run concurrently, give number for max instances" 72complete -c kitchen -f -n'__fish_kitchen_using_command setup' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 73 74# setup help 75complete -c kitchen -f -n'__fish_kitchen_using_command help' -a setup -d"Change instance state to setup. Prepare to run automated tests. Install busser" 76 77# setup instance-based commands 78complete -c kitchen -f -n'__fish_kitchen_using_command setup' -a'(__fish_kitchen_list)' 79 80# verify commands 81complete -c kitchen -f -n __fish_kitchen_no_command -a verify -d"Change instance state to verify. Run automated tests" 82complete -c kitchen -f -n'__fish_kitchen_using_command verify' -s c -l concurrency -d"Run concurrently, give number for max instances" 83complete -c kitchen -f -n'__fish_kitchen_using_command verify' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 84 85# verify help 86complete -c kitchen -f -n'__fish_kitchen_using_command help' -a verify -d"Change instance state to verify. Run automated tests" 87 88# verify instance-based commands 89complete -c kitchen -f -n'__fish_kitchen_using_command verify' -a'(__fish_kitchen_list)' 90 91# destroy commands 92complete -c kitchen -f -n __fish_kitchen_no_command -a destroy -d"Change instance state to destroy. Delete all information for one or more instances" 93complete -c kitchen -f -n'__fish_kitchen_using_command destroy' -s c -l concurrency -d"Run concurrently, give number for max instances" 94complete -c kitchen -f -n'__fish_kitchen_using_command destroy' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 95 96# destroy help 97complete -c kitchen -f -n'__fish_kitchen_using_command help' -a destroy -d"Change instance state to destroy. Delete all information for one or more instances" 98 99# destroy instance-based commands 100complete -c kitchen -f -n'__fish_kitchen_using_command destroy' -a'(__fish_kitchen_list)' 101 102# test commands 103complete -c kitchen -f -n __fish_kitchen_no_command -a test -d"Test (destroy, create, converge, setup, verify and destroy) one or more instances" 104complete -c kitchen -f -n'__fish_kitchen_using_command test' -s c -l concurrency -d"Run concurrently, give number for max instances" 105complete -c kitchen -f -n'__fish_kitchen_using_command test' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 106complete -c kitchen -f -n'__fish_kitchen_using_command test' -s d -l destroy -d"Destroy strategy to use after testing (passing, always, never)." 107complete -c kitchen -f -n'__fish_kitchen_using_command test' -l auto_init -d"Invoke init command if .kitchen.yml is missing" 108 109# test help 110complete -c kitchen -f -n'__fish_kitchen_using_command help' -a test -d"Test (destroy, create, converge, setup, verify and destroy) one or more instances" 111 112# test instance-based commands 113complete -c kitchen -f -n'__fish_kitchen_using_command test' -a'(__fish_kitchen_list)' 114 115# login commands 116complete -c kitchen -f -n __fish_kitchen_no_command -a login -d"Log in to one instance" 117complete -c kitchen -f -n'__fish_kitchen_using_command login' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 118 119# login help 120complete -c kitchen -f -n'__fish_kitchen_using_command help' -a login -d"Log in to one instance" 121 122# login instance-based commands 123complete -c kitchen -f -n'__fish_kitchen_using_command login' -a'(__fish_kitchen_list)' 124 125# exec commands 126complete -c kitchen -f -n __fish_kitchen_no_command -a exec -d"Execute command on one or more instance" 127complete -c kitchen -f -n'__fish_kitchen_using_command exec' -s l -l log_level -d"Set the log level (debug, info, warn, error, fatal)" 128complete -c kitchen -f -n'__fish_kitchen_using_command exec' -s c -l command -d"execute via ssh" 129 130# exec help 131complete -c kitchen -f -n'__fish_kitchen_using_command help' -a exec -d"Execute command on one or more instance" 132 133# exec instance-based commands 134complete -c kitchen -f -n'__fish_kitchen_using_command exec' -a'(__fish_kitchen_list)' 135 136# version commands 137complete -c kitchen -f -n __fish_kitchen_no_command -a version -d"Print Kitchen's version information" 138 139# version help 140complete -c kitchen -f -n'__fish_kitchen_using_command help' -a version -d"Print Kitchen's version information" 141 142# sink commands 143complete -c kitchen -f -n __fish_kitchen_no_command -a sink -d"Show the Kitchen sink!" 144 145# sink help 146complete -c kitchen -f -n'__fish_kitchen_using_command help' -a sink -d"Show the Kitchen sink!" 147 148# console commands 149complete -c kitchen -f -n __fish_kitchen_no_command -a console -d"Kitchen Console!" 150 151# console help 152complete -c kitchen -f -n'__fish_kitchen_using_command help' -a console -d"Kitchen Console!" 153 154# init commands 155complete -c kitchen -f -n __fish_kitchen_no_command -a init -d"Adds some configuration to your cookbook so Kitchen can rock" 156complete -c kitchen -f -n'__fish_kitchen_using_command init' -s D -l driver -d"One or more Kitchen Driver gems to be installed or added to a Gemfile " 157complete -c kitchen -f -n'__fish_kitchen_using_command init' -s P -l provisioner -d"The default Kitchen Provisioner to use " 158complete -c kitchen -f -n'__fish_kitchen_using_command init' -l create_gemfile -d"Whether or not to create a Gemfile if one does not exist. Default: false " 159 160# init help 161complete -c kitchen -f -n'__fish_kitchen_using_command help' -a init -d"Add some configuration to your cookbook" 162 163# driver commands 164complete -c kitchen -f -n __fish_kitchen_no_command -a driver -d"Driver subcommands" 165 166# driver help 167complete -c kitchen -f -n'__fish_kitchen_using_command help' -a driver -d"Driver subcommands"