Support non-script based file configuration of options
See original GitHub issueRelying on profile.ps1 may not fit scenarios where we want to set-executionpolicy to ban scripts.
Would it be possible to populate options from the registry or json file? I would image modifying PSConsoleReadlineOptions
is all that it takes?
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Support non-script based file configuration of options #635
When I originally considered the problem of configuration, I settled on script because I hated xml. I still hate xml, but it might...
Read more >TSConfig Reference - Docs on every TSConfig option
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
Read more >Configuration (GNU Coding Standards)
The configure script should write a file named config.status which describes which configuration options were specified when the program was last configured.
Read more >MySQL 8.0 Reference Manual :: 4.2.2.2 Using Option Files
Most MySQL programs can read startup options from option files (sometimes called configuration files). Option files provide a convenient way to specify ...
Read more >Load external configuration files | Filebeat Reference [8.9]
Filebeat can load external configuration files for inputs and modules, allowing you to separate your configuration into multiple smaller configuration files ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh, @nightroman was just suggesting you still use a
ps1
file like you would today, but PSReadLine would invoke it in a way that is not affected by the execution policy.I use the following pattern in my profile to make it feel more like a configuration and less like calling a bunch of commands:
I suppose one option is to mimic the module manifest, basically remove the first and last lines in my example above, then apply the options. This would also need to allow specifying key bindings, maybe like:
There’s precedent for this kind of configuration data in .psd1 files with DSC as well: https://docs.microsoft.com/en-us/powershell/dsc/separatingenvdata