aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2020-04-25 08:43:39 +0300
committerDylan Araps <dylan.araps@gmail.com>2020-04-25 08:43:39 +0300
commit70f410ebb2b0d54cab1b1d4db3804c654db9619a (patch)
tree0403dcda30800aea063dc9f8bc49b8ac4a3bfd30
parent0403a47f48f5f7b4e8ffe28f863d8ae2d2836e8d (diff)
downloadpure-sh-bible-70f410ebb2b0d54cab1b1d4db3804c654db9619a.tar.gz
pure-sh-bible-70f410ebb2b0d54cab1b1d4db3804c654db9619a.zip
general: Remove shell quirks. Closes #13
-rw-r--r--README.md28
1 files changed, 0 insertions, 28 deletions
diff --git a/README.md b/README.md
index 5214e58..60ea6d8 100644
--- a/README.md
+++ b/README.md
@@ -82,9 +82,6 @@ See something incorrectly described, buggy or outright wrong? Open an issue or s
* [Get the current working directory](#get-the-current-working-directory)
* [Get the PID of the current shell](#get-the-pid-of-the-current-shell)
* [Get the current shell options](#get-the-current-shell-options)
-* [SHELL QUIRKS](#shell-quirks)
- * [`shift` with no function arguments crashes `dash`.](#shift-with-no-function-arguments-crashes-dash)
- * [`read` with no given variable crashes `dash`.](#read-with-no-given-variable-crashes-dash)
* [AFTERWORD](#afterword)
<!-- vim-markdown-toc -->
@@ -1006,31 +1003,6 @@ This is an alternative to the `pwd` built-in.
"$-"
```
-# SHELL QUIRKS
-
-## `shift` with no function arguments crashes `dash`.
-
-```shell
-# This will crash `dash` if there are no arguments.
-shift
-
-# Solution (shift on its own is really 'shift 1').
-# This uses 'shift 0' if there are no arguments and
-# 'shift 1' if there are.
-shift "$(($# ? 1 : 0))"
-```
-
-## `read` with no given variable crashes `dash`.
-
-```shell
-# This will crash `dash`.
-read -r
-
-# Solution.
-# Use a dummy variable.
-read -r _
-```
-
# AFTERWORD
Thanks for reading! If this bible helped you in any way and you'd like to give back, consider donating. Donations give me the time to make this the best resource possible. Can't donate? That's OK, star the repo and share it with your friends!