aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-05-13 16:07:32 +0200
committerWynn Wolf Arbor2020-05-13 16:07:32 +0200
commitdea828f6d9b7161eea4df1d2011411972745deaf (patch)
tree3f74bac72d3b97e86f4864af2bc7cb41b46f24d2
parent1d79b6782a521e1712f29362bc8d7793c0a73402 (diff)
downloadbosun-dea828f6d9b7161eea4df1d2011411972745deaf.tar.gz
Add aliases for the `remove` command
Even if the user is familiar with bosun(1), they might try to remove a role by invoking it with `delete` or `del` instead of `remove`. As these are very common synonyms, add a simple DWIM mechanic to enhance the user experience.
-rwxr-xr-xbosun2
-rw-r--r--bosun.15
2 files changed, 6 insertions, 1 deletions
diff --git a/bosun b/bosun
index cbc9718..08f1842 100755
--- a/bosun
+++ b/bosun
@@ -96,6 +96,6 @@ case $cmd in
flush) flush;;
list) list "$@";;
rebuild) rebuild "$@";;
- remove) remove "$@";;
+ del|delete|remove) remove "$@";;
*) err "no such command '$cmd'"; usage;;
esac
diff --git a/bosun.1 b/bosun.1
index cc1a354..078d5ae 100644
--- a/bosun.1
+++ b/bosun.1
@@ -66,6 +66,11 @@ active role.
If no roles are given, rebuild all active roles.
.It Sy remove Em role ...
Deactivates the given roles on the system.
+.Pp
+This command has two aliases,
+.Sy del
+and
+.Sy delete .
.El
.Pp
If no command is given,