fix(tui): preserve ./ prefix in tab completion, closes #2087

This commit is contained in:
Mario Zechner
2026-03-14 04:12:38 +01:00
parent b6181bed92
commit acb0f4d807
2 changed files with 50 additions and 0 deletions

View File

@@ -575,6 +575,10 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider {
}
} else {
relativePath = join(dirname(displayPrefix), name);
// path.join normalizes away ./ prefix, preserve it
if (displayPrefix.startsWith("./") && !relativePath.startsWith("./")) {
relativePath = `./${relativePath}`;
}
}
} else {
// For standalone entries, preserve ~/ if original prefix was ~/