Skip to content

add initial set of terminal completions for zsh, bash, and fish - #233776

Merged
Daniel Imms (Tyriar) merged 158 commits into
mainfrom
merogge/terminal-suggest-wip
Nov 19, 2024
Merged

Daniel Imms (Tyriar) merged 158 commits into
mainfrom
merogge/terminal-suggest-wip

Conversation

@meganrogge

@meganrogge Megan Rogge (meganrogge) commented Nov 13, 2024 •

Copy link
Copy Markdown
Collaborator

@meganrogge

Copy link
Copy Markdown
Collaborator Author

fileType is 65 for the code executable.... so it doesn't get included ATM. not sure why that is. doesn't exist on the types

export enum FileType {
/**
* The file type is unknown.
*/
Unknown = 0,
/**
* A regular file.
*/
File = 1,
/**
* A directory.
*/
Directory = 2,
/**
* A symbolic link to a file.
*/
SymbolicLink = 64
}

if (fileType === vscode.FileType.File || fileType === vscode.FileType.SymbolicLink) {
executables.add(file);
}

@meganrogge Megan Rogge (meganrogge) changed the title add terminal completions for zsh, bash, and fish add code/code-insiders terminal completions for zsh, bash, and fish Nov 19, 2024
@meganrogge
Megan Rogge (meganrogge) marked this pull request as ready for review November 19, 2024 15:32
@meganrogge Megan Rogge (meganrogge) changed the title add code/code-insiders terminal completions for zsh, bash, and fish add initial set of terminal completions for zsh, bash, and fish Nov 19, 2024
if (!specName || !availableCommands.has(specName)) {
continue;
}
if (terminalContext.commandLine.startsWith(specName)) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this condition means that the completion won't work if a user does command1 && command2 and command2 is code or code-insiders for example.

It will work if the spec is command1 though.

I think we can defer that.

@Tyriar Daniel Imms (Tyriar) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, hard to do a full review but it was fairly close before. Let's make this the new baseline 👍

@Tyriar
Daniel Imms (Tyriar) merged commit e57cc50 into main Nov 19, 2024
@Tyriar
Daniel Imms (Tyriar) deleted the merogge/terminal-suggest-wip branch November 19, 2024 22:50
@bpasero

Benjamin Pasero (bpasero) commented Nov 20, 2024 •

Copy link
Copy Markdown
Contributor

Megan Rogge (@meganrogge) Daniel Imms (@Tyriar) I think it would have been great to either squash this as 1 commit or have good commit messages per commit that are descriptive. I myself tend to skip over writing any kind of commit message if I know that I am going to squash the PR, but when I plan to merge or rebase it, I try to be more descriptive to prevent our history looking like this:

image

Is this something you could consider for the future? Thanks!

@meganrogge

Copy link
Copy Markdown
Collaborator Author

Is there a way to undo this and squash all to one commit? That was what I had intended.

@Tyriar

Copy link
Copy Markdown
Contributor

Megan Rogge (@meganrogge) it's possible, but we shouldn't because it causes problems when people pull if they have pulled already.

@Tyriar

Copy link
Copy Markdown
Contributor

Turns out it was my fault since I disabled auto merge and re-enabled it 😅

@bpasero

Copy link
Copy Markdown
Contributor

Ah no worries, no need to rewrite history. Good you had the right intent 👍

@bpasero

Copy link
Copy Markdown
Contributor

And now it happened to me in #234847 🤔 . I had squash enabled, then disabled to change to a different name, set to squash again and then it got merged 🤯

image

Maybe a bug.

@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

requesting completions with empty prompt results in incomplete list Ship shell-agnostic terminal intellisense as a stable feature

5 participants