Add powershell-mode with basic function snippets (#220)
This commit is contained in:
parent
65764856df
commit
143b31a4eb
4 changed files with 40 additions and 0 deletions
8
snippets/powershell-mode/cmdletbinding
Normal file
8
snippets/powershell-mode/cmdletbinding
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: cmdletbinding
|
||||||
|
# key: cmd
|
||||||
|
# --
|
||||||
|
[cmdletbinding()]
|
||||||
|
Param (
|
||||||
|
$0
|
||||||
|
)
|
20
snippets/powershell-mode/comment-based-help
Normal file
20
snippets/powershell-mode/comment-based-help
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: comment-based-help
|
||||||
|
# key: cbh
|
||||||
|
# --
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
${1:Brief description}
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
${2:Longer description}
|
||||||
|
|
||||||
|
.PARAMETER Foobar
|
||||||
|
${3:Descriptions of parameter Foobar}
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
${4:Actual example}
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
${5:Additional notes}
|
||||||
|
\#>
|
7
snippets/powershell-mode/function
Normal file
7
snippets/powershell-mode/function
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: function
|
||||||
|
# key: fun
|
||||||
|
# --
|
||||||
|
Function ${1:Verb-Noun} {
|
||||||
|
$0
|
||||||
|
}
|
5
snippets/powershell-mode/parameter
Normal file
5
snippets/powershell-mode/parameter
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: parameter
|
||||||
|
# key: par
|
||||||
|
# --
|
||||||
|
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)][string]\$${1:Foobar}
|
Loading…
Reference in a new issue