3db8dd39a797f87f8b348f1b6b44953a25f3f170Peter Simons_have lxc-start && {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_names() {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber COMPREPLY=( $( compgen -W "$( lxc-ls )" "$cur" ) )
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber }
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_states() {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber COMPREPLY=( $( compgen -W "STOPPED STARTING RUNNING STOPPING ABORTING FREEZING FROZEN THAWED" "$cur" ) )
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber }
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_templates() {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber COMPREPLY=( $( compgen -W "$(ls @LXCTEMPLATEDIR@/ | sed -e 's|^lxc-||' )" "$cur" ) )
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber }
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister _lxc_generic_n() {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber local cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber COMPREPLY=()
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _get_comp_words_by_ref cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber case $prev in
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber -n)
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_names "$cur"
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 0
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber ;;
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber esac
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 1
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber }
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister _lxc_generic_ns() {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber local cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber COMPREPLY=()
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _get_comp_words_by_ref cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber case $prev in
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber -n)
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_names "$cur"
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 0
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber ;;
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber -s)
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_states "$cur"
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 0
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber ;;
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber esac
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 1
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber }
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister _lxc_generic_t() {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber local cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber COMPREPLY=()
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _get_comp_words_by_ref cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber case $prev in
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber -t)
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_templates "$cur"
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 0
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber ;;
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber esac
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 1
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber }
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister _lxc_generic_o() {
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber local cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber COMPREPLY=()
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _get_comp_words_by_ref cur prev
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber case $prev in
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber -o)
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber _lxc_names "$cur"
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 0
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber ;;
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber esac
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber return 1
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber }
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-attach
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-cgroup
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-console
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-destroy
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-device
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-execute
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-freeze
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-info
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-monitor
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-snapshot
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-start
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-stop
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_n lxc-unfreeze
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_ns lxc-wait
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_t lxc-create
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister
d0a6bd39400a6d14cfec94ad647f3af1bda1e321Christian Brauner complete -o default -F _lxc_generic_o lxc-copy
e0bc1067693e30644f60071f0fc861a84fb3fbb6Lucas Werkmeister complete -o default -F _lxc_generic_o lxc-start-ephemeral
0306de4f280adc0cd5faa3cd365c584d61c9e383Stéphane Graber}