mention lack of simple error handling in mapfile

Schlomo Schapiro
2020-12-15 21:52:45 +01:00
parent e8dba2c2d1
commit 6e4769101a

@@ -57,3 +57,6 @@ This prevents the shell from doing unwanted splitting and glob expansion, and th
### Exceptions: ### Exceptions:
If you have already taken care (through setting IFS and `set -f`) to have word splitting work the way you intend, you can ignore this warning. If you have already taken care (through setting IFS and `set -f`) to have word splitting work the way you intend, you can ignore this warning.
Another exception is the wish for error handling: `array=( $(mycommand) ) || die-with-error` works the way it looks while a similar `mapfile` construct like `mapfile -t array < <(mycommand)` **doesn't fail** and you will have to write more code for error handling.
```