-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add settings import to command line #10083
Comments
Thanks for the request! We've got a request for supporting import/export for color schemes, and we don't hate the idea . . . but we're wondering what value it adds over "copy the file over the existing settings.json"? 😄 |
(@miniksa suggests that finding the path to the settings file "sucks") |
I agree with @miniksa 😊, finding the path is at best non-intuitive. Additionally the path is fugly, but more importantly it includes your username. For most users this is their actual name. I don't really want that in scripts that are in remote SCM systems or the like. Further, using an action rather than a path abstracts the path so that WT can change the underlying path used as it may need, e.g. for preview WT vs main WT vs dev WT vs user installation vs system installation, etc. > wt import --preview --user localTestSettings.json
Settings imported to user installation of terminal preview I added the extra functionality (validation, etc) in the request just for fun really, but they could be facilitated in such a feature. This would mean that the person doing the configuring (who may not be the same person as the user), can easily know if settings are valid without needing to open the application. WRT color scheme import, that's a whole other thing IMHO. The imported values would of course end up in the settings.json, and may also need some validation. But I imagine that relates to opening up to the large color profiles community who may not appreciate needing to include the other, non-color related, WT settings in such profiles if these two features were one and the same thing. |
Outputting that to the console of the parent process would have the same difficulties as |
Yeah, exit codes to be preferred. I didn't realise there were problems for WT outputting on command line. Even for my sample outputs, I intended that they would be responses in the CLI rather than a modal or the like. |
As noted in #17329, we probably want to support YAML from https://www.commands.dev/ as well. |
Description of the new feature/enhancement
Command line argument allowing the import of new settings files.
This would make scripting of environment setup a bit less fiddly.
Something like
Potentially could validate settings during import to prevent overwriting existing settings with invalid ones
If getting really fancy, the command could update valid but older settings to newer schemas
The text was updated successfully, but these errors were encountered: