diff --git a/docs/commands/builtin/declare.md b/docs/commands/builtin/declare.md index 9094f5f..440f181 100644 --- a/docs/commands/builtin/declare.md +++ b/docs/commands/builtin/declare.md @@ -138,7 +138,7 @@ RHS. sum total a b c printf 'Final value of "total" is: %d\n' "$total" -\
\$ dash -c \'f() { if
- command shift 2\>/dev/null; then echo \"\$1\"; else echo \"no
+ errors caused by *special builtins*. \$ dash -c \'f() { if
+ command shift 2>/dev/null; then echo \"\$1\"; else echo \"no
args\"; fi; }; f\'
-no args \
While, POSIX requires this behavior, it isn't very
+no args
While, POSIX requires this behavior, it isn't very
obvious and some shells don't do it correctly. To work around this, you
can use something like:
-\ \$ mksh -c \'f() { if ! \${1+false} && shift; then echo
-\"\$1\"; else echo \"no args\"; fi; }; f\' no args \
~~The mksh
+ \$ mksh -c \'f() { if ! \${1+false} && shift; then echo
+\"\$1\"; else echo \"no args\"; fi; }; f\' no args
~~The mksh
maintainer refuses to change either the `shift` or `command` builtins.~~
[Fixed](https://github.com/MirBSD/mksh/commit/996e05548ab82f7ef2dea61f109cc7b6d13837fa).
(Thanks!)
- Perhaps almost as bad as the above, busybox sh's `shift` always
returns success, even when attempting to shift beyond the final
- argument. \ \$ bb -c \'f() { if shift; then echo \"\$1\";
+ argument. \$ bb -c \'f() { if shift; then echo \"\$1\";
else echo \"no args\"; fi; }; f\'
-(no output) \
The above mksh workaround will work in this case
+(no output)
The above mksh workaround will work in this case
too.
## See also
diff --git a/docs/commands/classictest.md b/docs/commands/classictest.md
index c000c2b..e804e78 100644
--- a/docs/commands/classictest.md
+++ b/docs/commands/classictest.md
@@ -87,60 +87,60 @@ Since Bash 4.1, all tests related to permissions respect ACLs, if the underlying
| Operator syntax | Description |
| ------------------------- | ----------------------------------------------------------------------------------------------- |
-| **-a**