Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Imms <[email protected]>
  • Loading branch information
meganrogge and Tyriar committed Jan 31, 2025
1 parent 38b6088 commit 1b1ebf5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions extensions/terminal-suggest/src/terminalSuggestMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,7 @@ export async function getCompletionItemsFromSpecs(
}
}

const shouldShowResourceCompletions =
(!terminalContext.commandLine.trim() || !specificItemsProvided) &&
!filesRequested &&
!foldersRequested;


if (tokenType === TokenType.Command) {
// Include builitin/available commands in the results
Expand All @@ -394,11 +391,15 @@ export async function getCompletionItemsFromSpecs(
items.push(createCompletionItem(terminalContext.cursorPosition, prefix, command, command.detail));
}
}
}

if (shouldShowResourceCompletions) {
filesRequested = true;
foldersRequested = true;
} else {
const shouldShowResourceCompletions =
(!terminalContext.commandLine.trim() || !specificItemsProvided) &&
!filesRequested &&
!foldersRequested;
if (shouldShowResourceCompletions) {
filesRequested = true;
foldersRequested = true;
}
}

let cwd: vscode.Uri | undefined;
Expand Down

0 comments on commit 1b1ebf5

Please sign in to comment.