Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses.
Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 0. See more linked questions. Related Hot Network Questions.
Question feed. Stack Overflow works best with JavaScript enabled. A continuation of advanced functions Why not convert those actions into parameter switches? Ensuring that nothing will be called or used if the combination was not meant to be. Consider the following ignore the name.
I had to call it something function:. This gives better control over what is used when calling the function or script. Running Get-Command against this function will help explain. This shows the acceptable ways to call this function. PowerShell now pro. This is not a feature of parameter sets but since we have each "action" as its own parameter we also can take advantage of calling the parameters by their shortest unambiguous string.
In your care that would accept the first letter. Depending on your function this could collide with common cmdlet parameters e. In this case I do not think there is any worry. You are adding paths to your environment.
It might be worth testing them before the get used. A simple code block might help prevent hair pulling down the line. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. Asked 5 years ago. Active 4 years, 11 months ago. Once you start writing truly platform agnostic code it doesn't matter as much. OR , you could try wsl mvn to see if that works without it. But you're trying to hack Windows to work sanely. Good luck with that. Show 8 more comments. Active Oldest Votes. Improve this answer. This does not work at all. Setting it in Windows does not transfer it to WSL2 — likejudo.
Although it does work from Powershell. Add a comment. Sign up or log in Sign up using Google. Sign up using Facebook. Was this helpful? Yes No It wasn't accurate. It wasn't clear. It wasn't relevant.
0コメント