52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
id: "powershell"
|
|
aliases:
|
|
- "pwsh"
|
|
- "ps1"
|
|
name: "PowerShell"
|
|
monacoLang: powershell
|
|
|
|
install:
|
|
manual: |
|
|
install -d "${pkg}/opt/powershell"
|
|
install -d "${pkg}/usr/local/bin"
|
|
|
|
ver="$(latest_release PowerShell/PowerShell | sed 's/^v//')"
|
|
wget "https://github.com/PowerShell/PowerShell/releases/download/v${ver}/powershell-${ver}-linux-x64.tar.gz" -O powershell.tar.gz
|
|
tar -xf powershell.tar.gz -C "${pkg}/opt/powershell"
|
|
ln -s /opt/powershell/pwsh "${pkg}/usr/local/bin/"
|
|
|
|
ver="$(latest_release PowerShell/PowerShellEditorServices)"
|
|
wget "https://github.com/PowerShell/PowerShellEditorServices/releases/download/${ver}/PowerShellEditorServices.zip"
|
|
unzip PowerShellEditorServices.zip
|
|
cp -RT PowerShellEditorServices "${pkg}/opt/powershell-editor-services"
|
|
|
|
repl: |
|
|
SHELL=/usr/bin/pwsh pwsh
|
|
input: |
|
|
expr 123 "*" 234
|
|
|
|
main: "main.ps1"
|
|
template: |
|
|
Write-Host "Hello, world!"
|
|
|
|
run: |
|
|
SHELL=/usr/bin/pwsh pwsh -NoExit main.ps1
|
|
|
|
scope:
|
|
code: |
|
|
Set-Variable x "$(expr 123 "*" 234)"
|
|
input: |
|
|
echo $x
|
|
|
|
lsp:
|
|
start: |
|
|
pwsh -NoLogo -NoProfile -Command "/opt/powershell-editor-services/PowerShellEditorServices/Start-EditorServices.ps1 -BundledModulesPath /opt/powershell-editor-services -LogPath '$PWD/.powershell-editor-services/lsp.log' -SessionDetailsPath '$PWD/.powershell-editor-services/session.json' -FeatureFlags @() -AdditionalModules @() -HostName Riju -HostProfileId 'riju' -HostVersion 0.0 -Stdio -LogLevel Normal"
|
|
code: "TODO"
|
|
item: "TODO"
|
|
|
|
skip:
|
|
- repl
|
|
- runrepl
|
|
- scope
|
|
- lsp
|