Skip to content

Instantly share code, notes, and snippets.

@mattmcnabb
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattmcnabb/0b99a41a0ac9795afba1 to your computer and use it in GitHub Desktop.
Save mattmcnabb/0b99a41a0ac9795afba1 to your computer and use it in GitHub Desktop.
IndentStyle
# Indent style for multiline hashtables
# I tend to think of the assignment and opening '@{' as
# one token.
$Capabilities = @{
MilitaryService = $false
DrinkAlcohol = $false
Vote = $false
}
# This usage works nearly everywhere for me
$Whatev | Foreach {
Get-Something
Do-Something
}
# and then C# style braces everywhere else
foreach ($Item in $Items)
{
Get-Something
Do-Something
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment