2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
8
Task/Inverted-syntax/PowerShell/inverted-syntax-2.psh
Normal file
8
Task/Inverted-syntax/PowerShell/inverted-syntax-2.psh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function Action ([scriptblock]$Expression, [Alias("if")][bool]$Test)
|
||||
{
|
||||
if ($Test) {&$Expression}
|
||||
}
|
||||
|
||||
Set-Alias -Name say -Value Action
|
||||
|
||||
say {"Thank God it's Friday!"} -if (Get-Date 5/27/2016).DayOfWeek -eq "Friday"
|
||||
Loading…
Add table
Add a link
Reference in a new issue