TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸TASIOMIND.DEV — OPERATIONAL▸▸▸FULL STACK DEVELOPER @ GWQ SERVICEPLUS AG▸▸▸FOUNDER — K8SGPT.AI▸▸▸OPEN SOURCE: ACTIVE▸▸▸DISTRIBUTED SYSTEMS / KUBERNETES / AI▸▸▸RUST + GO + PYTHON▸▸▸FIELD TESTED / STATUS — NOMINAL▸▸▸LOCATION: EUROPE/BERLIN▸▸▸

Aliases in PowerShell

April 6, 2021

code
# code $PROFILE.CurrentUserAllHosts
code $PROFILE
code
# Aliases for directories
Function goToProjects { Set-Location -Path G:\Projects }

Set-Alias -Name proj -Value goToProjects
  • The profile for the current user is at $PROFILE, but there are other ones for various hosts and all users as well
  • You can set aliases for commands, but you can not set aliases for commands that also take parameters. The workaround is to save the command with parameters as a function and then have an alias for that function instead of the command