diff --git a/scripts/my-profile.ps1 b/scripts/my-profile.ps1 index 024a0a5a..4e7c301f 100755 --- a/scripts/my-profile.ps1 +++ b/scripts/my-profile.ps1 @@ -12,7 +12,7 @@ function prompt { Write-Host "`n➤ " -noNewline -foregroundColor yellow; return # ALIAS NAMES del alias:pwd -force -errorAction SilentlyContinue -set-alias -name hlp -value open-help.ps1 +set-alias -name hlp -value write-help.ps1 set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory set-alias -name ll -value get-childitem # ll = list folder (long format) del alias:ls -force -errorAction SilentlyContinue diff --git a/scripts/open-help.ps1 b/scripts/open-help.ps1 deleted file mode 100755 index 74333e25..00000000 --- a/scripts/open-help.ps1 +++ /dev/null @@ -1,34 +0,0 @@ -<# -.SYNOPSIS - Provide help to the user -.DESCRIPTION - This PowerShell script launches new tabs in the Web browser with help pages. -.EXAMPLE - PS> ./open-help.ps1 -.LINK - https://github.com/fleschutz/PowerShell -.NOTES - Author: Markus Fleschutz | License: CC0 -#> - -try { - "" - & "$PSScriptRoot/write-typewriter.ps1" "DON'T PANIC - HELP IS ON THE WAY..." 170 - "" - & "$PSScriptRoot/open-URL.ps1" -text "1. See the official PowerShell documentation at: " "https://docs.microsoft.com/en-us/powershell" - Start-Sleep -milliseconds 50 - - & "$PSScriptRoot/open-URL.ps1" -text "2. A PowerShell tutorial is at: " "https://www.guru99.com/powershell-tutorial.html" - Start-Sleep -milliseconds 50 - - & "$PSScriptRoot/open-URL.ps1" -text "3. PowerShell FAQ's can be found here: " "https://github.com/fleschutz/PowerShell/blob/main/docs/FAQ.md" - Start-Sleep -milliseconds 50 - - & "$PSScriptRoot/open-URL.ps1" -text "4. A PowerShell Cheat Sheet is at: " "https://github.com/fleschutz/PowerShell/blob/main/docs/cheat-sheet.md" - "" - "NOTE: Use + to open the links in your browser." - exit 0 # success -} catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" - exit 1 -} diff --git a/scripts/write-help.ps1 b/scripts/write-help.ps1 new file mode 100755 index 00000000..49eb7716 --- /dev/null +++ b/scripts/write-help.ps1 @@ -0,0 +1,47 @@ +<# +.SYNOPSIS + Provide help to the user +.DESCRIPTION + This PowerShell script launches new tabs in the Web browser with help pages. +.EXAMPLE + PS> ./open-help.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + "" + Write-Host " " -foregroundColor black -backgroundColor white + Write-Host " ▄▄▄▄▄▄▄ ▄ ▄▄▄ ▄▄▄▄▄▄▄ " -foregroundColor black -backgroundColor white + Write-Host " █ ▄▄▄ █ ▄▄▀█ █ ▄▄▄ █ " -foregroundColor black -backgroundColor white + Write-Host " █ ███ █ █▀ ▄▀ █ ███ █ " -foregroundColor black -backgroundColor white + Write-Host " █▄▄▄▄▄█ ▄▀█▀█ █▄▄▄▄▄█ " -foregroundColor black -backgroundColor white + Write-Host " ▄▄▄▄ ▄ ▄▄▄██▄ ▄▄▄ ▄ " -foregroundColor black -backgroundColor white + Write-Host " ▀ █ ▀▄▄▀█▀▀█▀█▀█▀▀▀▄█ " -foregroundColor black -backgroundColor white + Write-Host " ▄▄██▀▀▄▄█ ▄▀▄▄▄▀ ▀ ▀▄ " -foregroundColor black -backgroundColor white + Write-Host " ▄▄▄▄▄▄▄ ▀▀██▄▄██▄ ▀ ▀ " -foregroundColor black -backgroundColor white + Write-Host " █ ▄▄▄ █ ▀▄ ▄▀ ▀ ██▀▀ " -foregroundColor black -backgroundColor white + Write-Host " █ ███ █ █▄ ▄ ▀▄ ▀█▀ " -foregroundColor black -backgroundColor white + Write-Host " █▄▄▄▄▄█ █▀▄█ ███▀ ▄ ▀ " -foregroundColor black -backgroundColor white + Write-Host " " -foregroundColor black -backgroundColor white + "" + Write-Host " 🔷 PowerShell documentation: " -noNewline + Write-Host "https://docs.microsoft.com/en-us/powershell" -foregroundColor blue + + Write-Host " 🔷 PowerShell tutorial: " -noNewline + Write-Host "https://www.guru99.com/powershell-tutorial.html" -foregroundColor blue + + Write-Host " 🔷 PowerShell FAQ's: " -noNewline + Write-Host "https://github.com/fleschutz/PowerShell/blob/main/docs/FAQ.md" -foregroundColor blue + + Write-Host " 🔷 PowerShell Cheat Sheet: " -noNewline + Write-Host "https://github.com/fleschutz/PowerShell/blob/main/docs/cheat-sheet.md" -foregroundColor blue + "" + "NOTE: Use + to open the links in your browser." + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +}