vors / ParamAlias

Aliases with param binding in powershell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ParamAlias

Aliases with param binding in powershell.

Create functions from existing functions with pre-binded parameter sets. To check source of the new function foo use $function:foo

##.Examples

Create alias l for ls -Recurse -Force

Set-ParamAlias -Name l -Command ls -parametersBinding @{Recurse = '$true'; Force = '$true'}`

Create alias rmrf for rm -Recurse -Force

Set-ParamAlias -Name rmrf -Command rm -parametersBinding @{Recurse = '$true'; Force = '$true'}

.References

Inspired by Jeffery Hicks' post.

About

Aliases with param binding in powershell

License:Apache License 2.0


Languages

Language:PowerShell 100.0%