diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 32cb0952..e6e46199 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3526,6 +3526,8 @@ PowerShell: - ".ps1" - ".psd1" - ".psm1" + interpreters: + - pwsh language_id: 293 Processing: type: programming diff --git a/samples/PowerShell/pwsh-shebang.ps1 b/samples/PowerShell/pwsh-shebang.ps1 new file mode 100644 index 00000000..873c35d8 --- /dev/null +++ b/samples/PowerShell/pwsh-shebang.ps1 @@ -0,0 +1,21 @@ +#!/usr/bin/env pwsh + +# source: https://github.com/PowerShell/PowerShellStandard/blob/3436bfc162d6804dd11d1d76c4faff486b4b405d/build.ps1 + +param ( + [Parameter(ParameterSetName="Clean")][switch]$Clean, + [Parameter(ParameterSetName="Test")][switch]$Test +) + +import-module $PSScriptRoot/PowerShellStandard.psm1 -force + +if ( $Clean ) { + Start-Clean + return +} + +Start-Build + +if ( $Test ) { + Invoke-Test +}