mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Support implicit cd with appended /
.
This is an experimental feature, proposed in the issue #22. https://github.com/fish-shell/fish-shell/issues/22#issuecomment-20483478
This commit is contained in:
parent
084e435883
commit
6c82e7acda
1
path.cpp
1
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) ||
|
if (string_prefixes_string(L"/", exp_path) ||
|
||||||
string_prefixes_string(L"./", exp_path) ||
|
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"..")
|
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) */
|
/* 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) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user