2022-11-18 17:02:20 +01:00
|
|
|
## The *my-profile.ps1* PowerShell Script
|
2022-11-17 20:02:26 +01:00
|
|
|
|
|
|
|
my-profile.ps1
|
2021-10-17 14:33:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
```powershell
|
|
|
|
|
|
|
|
|
|
|
|
[<CommonParameters>]
|
|
|
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
|
|
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
|
|
|
```
|
|
|
|
|
2022-11-17 20:02:26 +01:00
|
|
|
## Source Code
|
2022-11-17 20:05:34 +01:00
|
|
|
```powershell
|
2022-11-17 20:02:26 +01:00
|
|
|
# MY POWERSHELL PROFILE (this profile file defines the look & feel of PowerShell)
|
|
|
|
|
|
|
|
# WINDOW TITLE
|
|
|
|
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
|
|
|
|
$host.ui.RawUI.WindowTitle = "$Username @ $(hostname)"
|
|
|
|
|
|
|
|
# COMMAND PROMPT
|
|
|
|
function prompt { write-host -noNewline -foregroundColor yellow "`n➤"; return " " }
|
|
|
|
|
|
|
|
# ALIAS NAMES
|
|
|
|
del alias:pwd -force -errorAction SilentlyContinue
|
|
|
|
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
|
|
|
|
set-alias -name ls -value list-folder.ps1 # ls = list folder (short format)
|
2022-11-17 20:05:34 +01:00
|
|
|
```
|
2022-11-17 20:02:26 +01:00
|
|
|
|
2021-10-17 14:33:27 +02:00
|
|
|
*Generated by convert-ps2md.ps1 using the comment-based help of my-profile.ps1*
|