mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-27 00:21:15 -03:00
Changes to make autosuggestion smarter about not suggesting commands that could never succeed.
This commit is contained in:
7
path.cpp
7
path.cpp
@@ -497,10 +497,13 @@ void path_make_canonical( wcstring &path )
|
||||
{
|
||||
|
||||
/* Remove double slashes */
|
||||
replace_all(path, L"//", L"/");
|
||||
size_t size;
|
||||
do {
|
||||
size = path.size();
|
||||
replace_all(path, L"//", L"/");
|
||||
} while (path.size() != size);
|
||||
|
||||
/* Remove trailing slashes */
|
||||
size_t size = path.size();
|
||||
while (size--) {
|
||||
if (path.at(size) != L'/')
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user