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

Support other shell types for terminal shell integration history #155530

Closed
Tyriar opened this issue Jul 18, 2022 · 12 comments · Fixed by #156058
Closed

Support other shell types for terminal shell integration history #155530

Tyriar opened this issue Jul 18, 2022 · 12 comments · Fixed by #156058
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities terminal-shell-integration Shell integration, command decorations, etc. verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 18, 2022

Currently only pwsh, bash and zsh shell types are allowed to restore and fetch history for shell integration:

switch (shellType) {
case PosixShellType.Bash:
result = await fetchBashHistory(accessor);
break;
case PosixShellType.PowerShell:
case WindowsShellType.PowerShell:
result = await fetchPwshHistory(accessor);
break;
case PosixShellType.Zsh:
result = await fetchZshHistory(accessor);
break;
default: return [];
}

This needs to be more flexible to support other REPLs like fish, julia, python, etc.

@Tyriar Tyriar added feature-request Request for new features or functionality terminal-shell-integration Shell integration, command decorations, etc. labels Jul 18, 2022
@Tyriar Tyriar added this to the Backlog milestone Jul 18, 2022
@Tyriar Tyriar added the help wanted Issues identified as good community contribution opportunities label Jul 18, 2022
@babakks
Copy link
Contributor

babakks commented Jul 23, 2022

@Tyriar I've submitted a PR for fish shell. Could you please review it?

@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Aug 5, 2022
@pfitzseb
Copy link
Contributor

pfitzseb commented Aug 5, 2022

Should probably reopen this, considering that #156058 only supports fish.

@vscodenpa vscodenpa added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 5, 2022
@Tyriar Tyriar reopened this Aug 5, 2022
@vscodenpa vscodenpa removed the insiders-released Patch has been released in VS Code Insiders label Aug 5, 2022
@Tyriar
Copy link
Member Author

Tyriar commented Dec 13, 2023

Closing again, here's the current state:

  • fish is automatically activated
  • The Python extension is experimenting with shell integration in their REPL command
  • Julia extension handles shell integration
  • The Nushell extension handles shell integration

Generally new shells should be handled in extensions or manual scripts unless it hits some critical mass where it's justified to build in support for VS Code.

@Tyriar Tyriar closed this as completed Dec 13, 2023
@pfitzseb
Copy link
Contributor

Julia commands are now properly inserted into the history (and persisted across terminal restarts), but it looks like recent commands are not looked up based on the current shell (which means my zsh and julia commands are mixed together). Is that working as intended?

@Tyriar
Copy link
Member Author

Tyriar commented Dec 13, 2023

Doh, I read the issue wrong you're right 🤦

This does need to happen still and we'll run into this very soon with the upcoming Python integration. cc @anthonykim1

@anthonykim1
Copy link
Contributor

Yessss! I this would be awesome for run recent command microsoft/vscode-python#22647 which should happen in January after I make changes for #199770 as advised. (red/blue decorations are everywhere with Windows pwsh users when trying to use shell integration for Python REPL)

@Tyriar Tyriar modified the milestones: Backlog, December / January 2024 Dec 18, 2023
@meganrogge
Copy link
Contributor

@jooyoungseo here is where we're tracking this issue that you're eagerly awaiting 😄 .

@aiday-mar aiday-mar modified the milestones: December / January 2024, December / January 2024 Recovery 1, February 2024 Jan 25, 2024
@Tyriar Tyriar modified the milestones: February 2024, March 2024 Feb 20, 2024
@Tyriar
Copy link
Member Author

Tyriar commented Mar 22, 2024

@anthonykim1 planning on this for March?

@anthonykim1
Copy link
Contributor

@Tyriar I have a PR open, but did not have a room to finish this month. Will try to get this onto the plan next month!

@anthonykim1
Copy link
Contributor

anthonykim1 commented Aug 19, 2024

Closing this as completed since Julia, Nushell, Python is merged.

@anthonykim1
Copy link
Contributor

#224326 and #224325 have the appropriate verification steps. Removing this from the milestone.

@anthonykim1 anthonykim1 removed this from the August 2024 milestone Aug 26, 2024
@Tyriar Tyriar added this to the August 2024 milestone Aug 27, 2024
@Tyriar Tyriar added the verified Verification succeeded label Aug 27, 2024
@Tyriar
Copy link
Member Author

Tyriar commented Aug 27, 2024

@anthonykim1 since the work happened in August just adding verified it a nicer way to track things without losing the milestone info.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities terminal-shell-integration Shell integration, command decorations, etc. verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants