1
0
mirror of https://github.com/fleschutz/PowerShell.git synced 2025-03-28 15:46:35 +01:00

Added list-aliases.ps1

This commit is contained in:
Markus Fleschutz 2021-02-27 11:19:57 +01:00
parent ca5ba276d9
commit f7f206df3b
4 changed files with 24 additions and 1 deletions

View File

@ -36,6 +36,7 @@ go-music.ps1, go to the user's music folder
go-scripts.ps1, go to the PowerShell Scripts folder
hibernate.ps1, enables hibernate mode for the local computer (requires admin rights)
inspect-exe.ps1, prints basic information of the given executable file
list-aliases.ps1, lists all PowerShell aliases
list-anagrams.ps1, lists all anagrams of the given word
list-automatic-variables.ps1, lists the automatic variables of PowerShell
list-current-timezone.ps1, lists the current time zone details

1 Script Description
36 go-scripts.ps1 go to the PowerShell Scripts folder
37 hibernate.ps1 enables hibernate mode for the local computer (requires admin rights)
38 inspect-exe.ps1 prints basic information of the given executable file
39 list-aliases.ps1 lists all PowerShell aliases
40 list-anagrams.ps1 lists all anagrams of the given word
41 list-automatic-variables.ps1 lists the automatic variables of PowerShell
42 list-current-timezone.ps1 lists the current time zone details

View File

@ -106,6 +106,7 @@ Scripts for Git 📝
Scripts for PowerShell 🔎
------------------------
* [daily-tasks.sh](Scripts/daily-tasks.sh) - execute PowerShell scripts automatically as daily tasks (Linux only)
* [list-aliases.ps1](Scripts/list-aliases.ps1) - lists all PowerShell aliases
* [list-automatic-variables.ps1](Scripts/list-automatic-variables.ps1) - lists the automatic variables of PowerShell
* [list-cmdlets.ps1](Scripts/list-cmdlets.ps1) - lists the PowerShell cmdlets
* [list-modules.ps1](Scripts/list-modules.ps1) - lists the PowerShell modules

15
Scripts/list-aliases.ps1 Executable file
View File

@ -0,0 +1,15 @@
#!/bin/powershell
<#
.SYNTAX ./list-aliases.ps1
.DESCRIPTION lists all PowerShell aliases
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
get-alias
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}

View File

@ -1,5 +1,11 @@
# Personal PowerShell Profile
# ---------------------------
# comment/uncomment/adapt as you like
#function prompt {$null} # PS>
#function prompt { "$ " } # $
function prompt { "$(Get-Location)\> " } # C:\
function prompt { "$(Get-Location)> " } # C:\>
set-alias -name lsf -value get-childitem # lsf means list formatted