Skip to content

Instantly share code, notes, and snippets.

@miguno
Last active September 18, 2023 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguno/17dd7fe1dbde4fe34336b27930809c15 to your computer and use it in GitHub Desktop.
Save miguno/17dd7fe1dbde4fe34336b27930809c15 to your computer and use it in GitHub Desktop.
Setup for `just` on Windows 11: PowerShell aliases

To create an alias for just named j in Powershell that sets just's default shell to PowerShell itself, create a PowerShell profile with the following contents.

###
### PowerShell profile
### 
### Installation
### ============
### Store this file at `$HOME\Documents\PowerShell\Profile.ps1`,
### which applies this profile for the Current User on All Hosts.
###
### If you want to apply the profile differently, see
### https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.3
###

# Create an alias for just (https://github.com/casey/just) named `j`
# that sets just's default shell to PowerShell.
Function justFunc { just --shell powershell.exe --shell-arg -c $args }
Set-Alias -Name j -Value justFunc

Tested on Windows 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment