diff options
author | Wolfgang Müller | 2022-10-26 12:32:15 +0200 |
---|---|---|
committer | Wolfgang Müller | 2022-10-26 12:49:36 +0200 |
commit | 77dc0c04fd0439f2aa216f7c9e385df33a071703 (patch) | |
tree | bb4bb1a30c4cbe78142670d4ddc4b78da9ad61b1 | |
parent | 3bce19d12d93f1b27e7d2f2acbef0926417d5390 (diff) | |
download | bosun-master.tar.gz (sig) |
bosun manages role names that are user-defined and may be hard to
remember or annoying to type out. Supporting auto-complete frameworks in
modern shells is an obvious improvement. For now only support the fish
shell since we use that on all our systems.
-rw-r--r-- | contrib/completion/bosun.fish | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/completion/bosun.fish b/contrib/completion/bosun.fish new file mode 100644 index 0000000..7d3e72d --- /dev/null +++ b/contrib/completion/bosun.fish @@ -0,0 +1,16 @@ +set -l commands add flush list rebuild remove +complete -c bosun -f + +complete -c bosun -n "not __fish_seen_subcommand_from $commands" -a add -d "Activate the given roles" +complete -c bosun -n "not __fish_seen_subcommand_from $commands" -a flush -d "Deactivate all active roles" +complete -c bosun -n "not __fish_seen_subcommand_from $commands" -a list -d "List roles of the given type" +complete -c bosun -n "not __fish_seen_subcommand_from $commands" -a rebuild -d "Reactivate the given roles" +complete -c bosun -n "not __fish_seen_subcommand_from $commands" -a remove -d "Deactivate the given roles" + +complete -c bosun -n "__fish_seen_subcommand_from add" -a "(bosun list available)" +complete -c bosun -n "__fish_seen_subcommand_from list" -a active -d "List roles that are active" +complete -c bosun -n "__fish_seen_subcommand_from list" -a all -d "List all roles" +complete -c bosun -n "__fish_seen_subcommand_from list" -a available -d "List roles that are not active on the system" + +complete -c bosun -n "__fish_seen_subcommand_from rebuild" -a "(bosun list active)" +complete -c bosun -n "__fish_seen_subcommand_from remove" -a "(bosun list active)" |