aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/read.in
Commit message (Collapse)AuthorAge
* Fix incorrect error on `read` with 1-character inputGravatar Kevin Ballard2014-09-21
| | | | | | When `read` is given a single character of input (including the newline), it was bailing as if it had been given no input. This is incorrect.
* Implement new `read --null` flagGravatar Kevin Ballard2014-09-21
| | | | | | | | The `--null` flag to `read` makes it split incoming lines on NUL instead of newlines. This is intended for processing the output of a command that uses NUL separators (such as `find -print0`). Fixes #1694.
* New -n option for read builtinGravatar Joseph Tannhuber2014-09-03
| | | | | Usage: read -n nchars Reads maximum of nchars characters. If nchars <= 0, there's no limit.
* Trim trailing newline on cmdsubst when IFS=''Gravatar Kevin Ballard2014-08-29
| | | | | | | When $IFS is empty, command substitution no longer splits on newlines. However we still want to trim off a single trailing newline, as most commands will emit a trailing newline and it makes it harder to work with their output.
* read: Support arrays, character splittingGravatar Kevin Ballard2014-07-14
Enhance the `read` builtin to support creating an array with the --array flag. With --array, only a single variable name is allowed and the entire input is tokenized and placed into that variable as an array. Also add custom behavior if IFS is empty or unset. In that event, split the input on every character, instead of the previous behavior of doing no splitting at all.