summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Lee <ray-github@evq.io>2022-04-18 22:06:52 -0700
committerGitHub <noreply@github.com>2022-04-18 22:06:52 -0700
commit1cc18d7be90297b2977ef525fdfcd5f9fceeb70c (patch)
tree9c4020e1c6b43fab62dacc0eca441ab991127d75
parent8e6a2c792693cb1715376be850d3891c119fb54e (diff)
Fix whitespace on bool type
-rwxr-xr-xtldr21
1 files changed, 11 insertions, 10 deletions
diff --git a/tldr b/tldr
index 5333126..118c29c 100755
--- a/tldr
+++ b/tldr
@@ -573,7 +573,8 @@ interactive() {
}
# bool defines a boolean setter / getter initialized to false.
-# Usage: `bool name`
+# Usage:
+# bool name
# name [true|false]
# if name; then... if ! name; then... name && ...
bool() {
@@ -582,15 +583,15 @@ bool() {
# localized complexity helps simplify the rest.
# Anyway, this creates a new global function using $1 as its name,
# acting per the description of `bool` above.
- eval "
- $1() {
- case \$# in
- 0) \$$_bool_var_name ;;
- 1) [ \"\$1\" = true ] && $_bool_var_name=true || $_bool_var_name=false ;;
- esac
- }
- $_bool_var_name=false
- "
+ eval "
+ $1() {
+ case \$# in
+ 0) \$$_bool_var_name ;;
+ 1) [ \"\$1\" = true ] && $_bool_var_name=true || $_bool_var_name=false ;;
+ esac
+ }
+ $_bool_var_name=false
+ "
}
main "$@"