aboutsummaryrefslogtreecommitdiffhomepage
path: root/path.cpp
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <glitchmr@myopera.com>2013-10-01 08:25:13 +0200
committerGravatar Konrad Borowski <glitchmr@myopera.com>2013-10-01 08:25:13 +0200
commit6c82e7acda212c7de5e0e8c46d4ba5f1b12fc061 (patch)
tree168f810d98e344014693324cb0d4e89ed291bd81 /path.cpp
parent084e435883cd3eb83d2385c2c7cc7b029f45ecf9 (diff)
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
Diffstat (limited to 'path.cpp')
-rw-r--r--path.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/path.cpp b/path.cpp
index 3a0b9c83..4649e805 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) */