From d63db59adeb84251c3ab5fe1b13981e44571bf31 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sun, 13 Jul 2014 18:56:19 -0700 Subject: [PATCH] Clean up the IFS handling in command substitution Remove the useless ASCII test of the first byte of IFS. We don't split on the first character, we only use a non-empty IFS as a signal to split on newlines. --- exec.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/exec.cpp b/exec.cpp index f2d168a9f..dfd04231e 100644 --- a/exec.cpp +++ b/exec.cpp @@ -1548,16 +1548,7 @@ static int exec_subshell_internal(const wcstring &cmd, wcstring_list_t *lst, boo if (! ifs.missing_or_empty()) { - if (ifs.at(0) < 128) - { - sep = '\n';//ifs[0]; - } - else - { - sep = 0; - debug(0, L"Warning - invalid command substitution separator '%lc'. Please change the first character of IFS", ifs[0]); - } - + sep = '\n'; } is_subshell=1;