fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
9367d4ff7
master
1function __fish_complete_jails 2ezjail-admin list| tail +3 | awk '{ print $4 }' 3end 4 5function __fish_complete_running_jails 6ezjail-admin list| tail +3 | string match -r'^.R' | awk '{ print $4 }' 7end 8 9function __fish_complete_stopped_jails 10ezjail-admin list| tail +3 | string match -r'^.S' | awk '{ print $4 }' 11end 12 13# archive 14complete -xc ezjail-admin -n __fish_use_subcommand -a archive -d"create a backup of one or several jails" 15complete -xc ezjail-admin -n"__fish_seen_subcommand_from archive" -a"(__fish_complete_jails)" -d jail 16 17# config 18complete -xc ezjail-admin -n __fish_use_subcommand -a config -d"manage specific jails" 19complete -xc ezjail-admin -n"__fish_seen_subcommand_from config" -a"(__fish_complete_jails)" -d jail 20 21# console 22complete -xc ezjail-admin -n __fish_use_subcommand -a console -d"attach your console to a running jail" 23complete -xc ezjail-admin -n"__fish_seen_subcommand_from console" -a"(__fish_complete_jails)" -d jail 24 25# create 26complete -xc ezjail-admin -n __fish_use_subcommand -a create -d"installs a new jail inside ezjail's scope" 27 28# delete 29complete -xc ezjail-admin -n __fish_use_subcommand -a delete -d"removes a jail from ezjail's config" 30complete -xc ezjail-admin -n"__fish_seen_subcommand_from delete" -a"(__fish_complete_jails)" -d jail 31 32# freeze 33complete -xc ezjail-admin -n __fish_use_subcommand -a freeze -d"dump diffs between jail initialisation and freeze time into a flavour" 34complete -xc ezjail-admin -n"__fish_seen_subcommand_from freeze" -a"(__fish_complete_jails)" -d jail 35 36# install 37complete -xc ezjail-admin -n __fish_use_subcommand -a install -d"create the basejail from binary packages" 38 39# list 40complete -xc ezjail-admin -n __fish_use_subcommand -a list -d"list all jails" 41 42# restart 43complete -xc ezjail-admin -n __fish_use_subcommand -a restart -d"restart a running jail" 44complete -xc ezjail-admin -n"__fish_seen_subcommand_from restart" -a"(__fish_complete_running_jails)" -d jail 45 46# restore 47complete -xc ezjail-admin -n __fish_use_subcommand -a restore -d"create new jails from archived versions" 48 49# snapshot 50complete -xc ezjail-admin -n __fish_use_subcommand -a snapshot -d"create a snapshot of a jail" 51complete -xc ezjail-admin -n"__fish_seen_subcommand_from snapshot" -a"(__fish_complete_jails)" -d jail 52 53# start 54complete -xc ezjail-admin -n __fish_use_subcommand -a start -d"start a jail" 55complete -xc ezjail-admin -n"__fish_seen_subcommand_from start" -a"(__fish_complete_stopped_jails)" -d jail 56 57# stop 58complete -xc ezjail-admin -n __fish_use_subcommand -a stop -d"stop a running jail" 59complete -xc ezjail-admin -n"__fish_seen_subcommand_from stop" -a"(__fish_complete_running_jails)" -d jail 60 61# troubleshoot 62complete -xc ezjail-admin -n __fish_use_subcommand -a troubleshoot -d"check for reasons for the jails to fail" 63 64# update 65complete -xc ezjail-admin -n __fish_use_subcommand -a update -d"create or update the basejail from source"