aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/builtin_string.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-25 14:17:53 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-09-25 14:19:15 -0700
commitabeaac66328f83d8962d6a5a4b9ce8712edbbaa5 (patch)
tree72ee133f395935a0ffe977f6a6f189dfb5314628 /src/builtin_string.cpp
parentd591cebf4463e42569400bbcbaba5e16dcad734b (diff)
Teach builtin_string to recognize redirections, not just pipes
Allows cases like `string split \n < file.txt` to work. Fixes 2422
Diffstat (limited to 'src/builtin_string.cpp')
-rw-r--r--src/builtin_string.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builtin_string.cpp b/src/builtin_string.cpp
index 22f16fc6..a35903cb 100644
--- a/src/builtin_string.cpp
+++ b/src/builtin_string.cpp
@@ -54,7 +54,7 @@ static void string_unknown_option(parser_t &parser, io_streams_t &streams, const
/* We read from stdin if we are the second or later process in a pipeline. */
static bool string_args_from_stdin(const io_streams_t &streams)
{
- return ! streams.is_first_process_in_pipeline;
+ return streams.stdin_is_directly_redirected;
}
static const wchar_t *string_get_arg_stdin(wcstring *storage, const io_streams_t &streams)