aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/expand.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/expand.cpp b/src/expand.cpp
index cb68eb98..72a72e77 100644
--- a/src/expand.cpp
+++ b/src/expand.cpp
@@ -1818,8 +1818,9 @@ static expand_error_t expand_stage_wildcards(const wcstring &input, std::vector<
In either case, we ignore the path if we start with ./ or /.
Also ignore it if we are doing command completion and we contain a slash, per IEEE 1003.1, chapter 8 under PATH
*/
- if (string_prefixes_string(L"./", path_to_expand) ||
- string_prefixes_string(L"/", path_to_expand) ||
+ if (string_prefixes_string(L"/", path_to_expand) ||
+ string_prefixes_string(L"./", path_to_expand) ||
+ string_prefixes_string(L"../", path_to_expand) ||
(for_command && path_to_expand.find(L'/') != wcstring::npos))
{
effective_working_dirs.push_back(working_dir);