-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Allow custom dynamic profile generator sources #7805
Comments
Hey thanks for the great writeup! We're actually working on something just like this over in #7584/#7632. We're going for more of an approach of "tools can generate profiles for the Terminal, and leave them somewhere the Terminal will know to look for them". The more elaborate case, where the Terminal runs the 3rd party generator at launch, is largely being tracked by #4000. I'm gonna close this in favor of those threads, but feel free to hop on the discussion! |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Thank you for the response. I look forward to being able to utilize those features. |
Description of the new feature/enhancement
A plug and play approach to dynamic profiles. This would allow people who want profiles generated dynamically to easily do so. Instead of Windows Terminal having to support lots of dynamic profile generators that different users suggest with lots of configuration options, users could create them themselves and possibly share via git. I tried searching to see if this was already suggested and was surprised it wasn't. If an issue already does exist and I just missed it then I apologize. Currently, there isn't even a way to easily script editing the settings file. Here are a few use cases:
Docker
One example use case is if someone wanted a dynamic profile for all docker containers that are currently running or maybe all containers regardless of whether they are running or not. This would address #4892 without locking in everyone to the same command. Some people may want volumes to be included while others may want to exec into the container without modifying it at all. Some may want to pass in specific environment variables or something. Point is, it would be customizable.
Customizing WSL profiles
Instead of the built in
Windows.Terminal.Wsl
generator, someone may want to allow specifying a different shell (commandline) or to pass in extra flags, etc. This would also address #5571 which does mention dynamic profiles as plugins.SSH
If a user wants to dynamically generate profiles that directly ssh into other machines based off
~/.ssh/known_hosts
. CUrrently, these can easily be added manually and look something like this:Or if someone prefers to use ssh from WSL2 distro instead of openssh (Not sure if there is any advantage),
Proposed technical implementation details (optional)
My suggestion would be to add another top-level section that is an array of objects containing the source name and a script for generating profiles. Maybe this script is required to be a powershell or bash script with functions that match specific names. Maybe this script is allowed to be any language as long as it is executable. Perhaps it is required to be written in c and adhere to the
IDynamicProfileGenerator.h
that already exists. I am not sure whether it would be better for the script plugin to output json array that gets merged into the list of profiles automatically or whether it should just output list of names and guids and then have a second call based onsource
that actually determines what should happen for that profile which is what the existing dynamic profiles do. For exampleThe text was updated successfully, but these errors were encountered: