fix echo -h

In addition to fixing `echo -h` this includes some debugging related
cleanups I made while investigating the issue.

Fixes #4120
This commit is contained in:
Kurtis Rader
2017-06-18 22:07:48 -07:00
parent 59a11188df
commit 82f5fb507d
12 changed files with 26 additions and 37 deletions

View File

@@ -877,9 +877,7 @@ parse_execution_result_t parse_execution_context_t::populate_plain_process(
process_type = function_exists(L"cd") ? INTERNAL_FUNCTION : INTERNAL_BUILTIN;
} else {
const globspec_t glob_behavior = (cmd == L"set" || cmd == L"count") ? nullglob : failglob;
// Form the list of arguments. The command is the first argument. TODO: count hack, where we
// treat 'count --help' as different from 'count $foo' that expands to 'count --help'. fish
// 1.x never successfully did this, but it tried to!
// Form the list of arguments. The command is the first argument.
parse_execution_result_t arg_result =
this->determine_arguments(statement, &argument_list, glob_behavior);
if (arg_result != parse_execution_success) {