diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-07-17 01:35:30 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-07-17 01:35:30 -0700 |
commit | 1511de68ed847c82989561c2619f5f817097ad38 (patch) | |
tree | 1e2d0bfa3813d9fe3b06d72e309ae87f3a6c63ce /expand.cpp | |
parent | d6c9d3ce948c6bff13431c195f65860b5a1f0230 (diff) |
Make parse_util_locate_cmdsubst return the innermost command substitution instead of the outermost.
Diffstat (limited to 'expand.cpp')
-rw-r--r-- | expand.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -1336,10 +1336,7 @@ static int expand_cmdsubst(parser_t &parser, const wcstring &input, std::vector< const wchar_t * const in = input.c_str(); int parse_ret; - switch (parse_ret = parse_util_locate_cmdsubst(in, - ¶n_begin, - ¶n_end, - 0)) + switch (parse_ret = parse_util_locate_cmdsubst(in, ¶n_begin, ¶n_end, false)) { case -1: parser.error(SYNTAX_ERROR, @@ -1628,10 +1625,7 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa { wchar_t *begin, *end; - if (parse_util_locate_cmdsubst(input.c_str(), - &begin, - &end, - 1) != 0) + if (parse_util_locate_cmdsubst(input.c_str(), &begin, &end, true) != 0) { parser.error(CMDSUBST_ERROR, -1, L"Command substitutions not allowed"); return EXPAND_ERROR; |