#For Windows PowerShell
set-alias -name <alias_name> -value <command>
#<alias_name> is the new alias name you want to set.
#<command> is the command you want to alias.
#NB: this is temporal and will not work when powershell is reboot.
#To make it permanent, add it to PowerShell Profile.ps1 file.
# On your profile.ps1 file
# if you don't have it yet, just run code $PROFILE to create and edit it (with vscode)
function NpmRunDev {
npm run dev
}
Set-Alias nrd NpmRunDev
// create a profile.ps1 file to set aliases
notepad $((Split-Path $profile -Parent) + "profile.ps1")
// example aliases (opens notepad when you type `edit` in console)
Set-Alias edit notepad.exe
// example aliases (opens notepad when you type `edit` in console)
Set-Alias edit1 "C:Program FilesWindows NTAccessorieswordpad.exe"
#For Windows PowerShell
function <alias_name> {cd "C:Users..."}
#We use `function` and not
set-alias -name <new_alias> -value <command>
#because cmdlets(cd) don't work in set-alias -value.
#NB: this is temporal and will not work when powershell is rebooted.
#To make it permanent, add it to PowerShell Profile.ps1 file.
set-theme [some themes]