fix(tui): avoid cwd-path matches in @ autocomplete
Only use fd --full-path for path queries so plain fuzzy @ autocomplete results no longer depend on whether the cwd path contains the query text. closes #2778
This commit is contained in:
@@ -137,7 +137,6 @@ async function walkDirectoryWithFd(
|
||||
"f",
|
||||
"--type",
|
||||
"d",
|
||||
"--full-path",
|
||||
"--hidden",
|
||||
"--exclude",
|
||||
".git",
|
||||
@@ -147,6 +146,10 @@ async function walkDirectoryWithFd(
|
||||
".git/**",
|
||||
];
|
||||
|
||||
if (toDisplayPath(query).includes("/")) {
|
||||
args.push("--full-path");
|
||||
}
|
||||
|
||||
if (query) {
|
||||
args.push(buildFdPathQuery(query));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user