From daaa255f6338f74000c6a2fb081a015d4d19fd37 Mon Sep 17 00:00:00 2001 From: acesyde Date: Sat, 21 Dec 2024 20:28:06 +0100 Subject: [PATCH 1/2] docs: add powershell sample --- docs/tasks/file-tasks.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/tasks/file-tasks.md b/docs/tasks/file-tasks.md index 386e0a34de..7010e93fb5 100644 --- a/docs/tasks/file-tasks.md +++ b/docs/tasks/file-tasks.md @@ -56,6 +56,14 @@ You can also use it to run the script with various programming languages. ::: code-group +```js [powershell] +#!/usr/bin/env pwsh +#MISE description="Hello, World in Powershell" + +$current_directory = Get-Location +Write-Host "Hello from Powershell, current directory is $current_directory" +``` + ```js [node] #!/usr/bin/env node //MISE description="Hello, World in Node.js" From 80c30b1c10ae54a8eee3fc8afb8581040046a4a8 Mon Sep 17 00:00:00 2001 From: acesyde Date: Sat, 21 Dec 2024 20:40:35 +0100 Subject: [PATCH 2/2] fix: doc order --- docs/tasks/file-tasks.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/tasks/file-tasks.md b/docs/tasks/file-tasks.md index 7010e93fb5..26ce0597e6 100644 --- a/docs/tasks/file-tasks.md +++ b/docs/tasks/file-tasks.md @@ -56,14 +56,6 @@ You can also use it to run the script with various programming languages. ::: code-group -```js [powershell] -#!/usr/bin/env pwsh -#MISE description="Hello, World in Powershell" - -$current_directory = Get-Location -Write-Host "Hello from Powershell, current directory is $current_directory" -``` - ```js [node] #!/usr/bin/env node //MISE description="Hello, World in Node.js" @@ -85,6 +77,14 @@ print('Hello, World!') console.log(`PATH, ${Deno.env.get("PATH")}`); ``` +```powershell [powershell] +#!/usr/bin/env pwsh +#MISE description="Hello, World in Powershell" + +$current_directory = Get-Location +Write-Host "Hello from Powershell, current directory is $current_directory" +``` + ::: ## Editing tasks