Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Suggestion: Show folder in PATH executable completions #237595

Open
Tyriar opened this issue Jan 9, 2025 · 1 comment
Open

Terminal Suggestion: Show folder in PATH executable completions #237595

Tyriar opened this issue Jan 9, 2025 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality terminal-suggest
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 9, 2025

This will be very useful in general, but a particularly good case is identifying the python very being used (after/before py env activation):

Image

cc @meganrogge

@Tyriar Tyriar added feature-request Request for new features or functionality terminal-suggest labels Jan 9, 2025
@Tyriar Tyriar added this to the January 2025 milestone Jan 9, 2025
@Tyriar Tyriar self-assigned this Jan 9, 2025
@Tyriar
Copy link
Member Author

Tyriar commented Jan 9, 2025

Actually this is blocked on turning a richer type here:

const commandsInPath = await getCommandsInPath();
const builtinCommands = getBuiltinCommands(shellPath);

We pass these Set<string> into getCompletionItemsFromSpecs but we want something more like Set<Partial<CompletionItem> | string> with a required label. This was also a problem when trying to pass back descriptions for commands from Get-Command here:

case 'pwsh': {
// TODO: Select `CommandType, DisplayName` and map to a rich type with kind and detail
const output = execSync('Get-Command -All | Select-Object Name | ConvertTo-Json', options);
let json: any;
try {
json = JSON.parse(output);
} catch (e) {
console.error('Error parsing pwsh output:', e);
return [];
}
commands = (json as any[]).map(e => e.Name);
break;
}

@Tyriar Tyriar assigned meganrogge and unassigned Tyriar Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality terminal-suggest
Projects
None yet
Development

No branches or pull requests

2 participants