mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
add missing special-case for ../
When I reviewed the fix for #952 I noted that "../" wasn't handled but in my haste to merge it forgot to augment the pull-request.
This commit is contained in:
parent
6c5f923a47
commit
6adc35c636
@ -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 /.
|
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
|
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) ||
|
if (string_prefixes_string(L"/", path_to_expand) ||
|
||||||
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))
|
(for_command && path_to_expand.find(L'/') != wcstring::npos))
|
||||||
{
|
{
|
||||||
effective_working_dirs.push_back(working_dir);
|
effective_working_dirs.push_back(working_dir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user