diff --git a/path.cpp b/path.cpp index 3a0b9c83d..4649e8051 100644 --- a/path.cpp +++ b/path.cpp @@ -315,6 +315,7 @@ bool path_can_be_implicit_cd(const wcstring &path, wcstring *out_path, const wch if (string_prefixes_string(L"/", exp_path) || string_prefixes_string(L"./", exp_path) || string_prefixes_string(L"../", exp_path) || + string_suffixes_string(L"/", exp_path) || exp_path == L"..") { /* These paths can be implicit cd, so see if you cd to the path. Note that a single period cannot (that's used for sourcing files anyways) */