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

Make PowerShell-specific configuration keys for aliases available for variable definitions as well #100

Open
1 task done
RogueScholar opened this issue Mar 24, 2024 · 1 comment
Assignees

Comments

@RogueScholar
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct

What would you like to see changed/added?

This is quite the nifty little tool you've whipped up here! As someone who has to utilize a mixture of Windows and Linux setups and is often forced to shift between them unexpectedly and more than I'd like to, I see a lot of potential here to be able to make changes to all of my dev. environments in just one place and propagate through all of them from there with much more reliability, which is exciting.

My inquiry/request is exactly as seen in the title, namely if you think it's possible to make the exact same PowerShell-specific subkeys currently evaluated for alias:description:, force:, option: and scope:—likewise be parsed for variables set using env: in an aliae configuration file? I make pretty extensive use of those arguments with both Set-Variable as well as Set-Alias in my PowerShell profiles currently to keep certain workflows behaving appropriately for each of the user accounts I may identify to them as.

My hope is that the nature of PowerShell arguments to be interpreted according to a fairly strict rubric (provided the Commands they modify share the same Verb prefix, as Set-Alias and Set-Variable do) will mean this is a fairly trivial and uncontentious request. Of course I'd normally prefer to present a need such as this in the form of a PR, but having zero prior experience coding in Go made me hesitate to do so. Rather than try and "wing it" and possibly cause you to spend more time bringing me up to speed while reviewing such a PR, it seemed best to first make contact and gauge your amenability to the idea, first. (As an aside, your issue template configuration currently has a button whose target is the Discussions area and I had first tried to go down that path, but it was a dead end, as this repo's Discussions feature isn't actually turned on, hehe.)

I look forward to hearing your thoughts, and of course stand ready to pitch in by submitting updates to the documentation that reflect any new behavior stemming from my request. Thank you for your time and consideration.

Warmly,
Peter

@JanDeDobbeleer
Copy link
Owner

JanDeDobbeleer commented Mar 24, 2024

@RogueScholar today we use $env:Foo = 'Bar' to set environment variables, but from my research it seems we can't use Set-Variable to set an environment variable (unless that's missing in the docs). From what I gather, we need to use New-Item -Path Env:\Foo -Value 'Bar'. Or is this information incorrect?

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

No branches or pull requests

2 participants