From 3f7e125b577498002641cbfa9e9b687d89e9b700 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 15 Sep 2021 18:32:42 +0200 Subject: [PATCH] Also give path nullglob behavior This is needed because you might feasibly give e.g. `path filter` globs to further match, and they might already present no results. It's also well-handled since path simply does nothing if given no paths. --- src/parse_execution.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index f0eee5ff3..2c317a6f2 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -891,7 +891,7 @@ end_execution_reason_t parse_execution_context_t::populate_plain_process( function_exists(L"cd", *parser) ? process_type_t::function : process_type_t::builtin; } else { // Not implicit cd. - const globspec_t glob_behavior = (cmd == L"set" || cmd == L"count") ? nullglob : failglob; + const globspec_t glob_behavior = (cmd == L"set" || cmd == L"count" || cmd == L"path") ? nullglob : failglob; // Form the list of arguments. The command is the first argument, followed by any arguments // from expanding the command, followed by the argument nodes themselves. E.g. if the // command is '$gco foo' and $gco is git checkout.