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

Add capability to specify which hosts a PSProfile setting should be applicable to #30

Open
janegilring opened this issue Oct 25, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@janegilring
Copy link

janegilring commented Oct 25, 2019

It would be useful to be able to specify what PowerShell hosts (PowerShell Core, Windows PowerShell, PowerShell ISE, VS Code, etc) a specific init script, script, module and so on should be loaded in. Default value could be "All" for such a setting.

This would make it possible to only load specific things in a specific host, for example some modules don't work in all hosts.

Another use case is that one might not want "heavy" things like large modules and such loaded when working in a specific environment such as VS Code, where a fast startup time is convenient when testing different things, reloading the integrated console and so on.

@scrthq scrthq self-assigned this Oct 28, 2019
@scrthq scrthq added the enhancement New feature or request label Oct 28, 2019
@scrthq
Copy link
Member

scrthq commented Oct 28, 2019

I like it! I've been thinking about a way to add conditionals to each setting, which I think would cover this in a way. My initial thought was to support a ScriptBlock condition property on each non-essential section/setting where it makes sense. Thoughts?

@janegilring
Copy link
Author

Yes, that would make it really flexible with regards to other conditions as well. Such as hostname (useful when sharing the same config across multiple machines) and operating systems.

Thumbs up 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants