Skip to content

Instantly share code, notes, and snippets.

@aifrak
Created November 22, 2023 21:39
Show Gist options
  • Select an option

  • Save aifrak/a5e14ef1e2f0737935f195c8f3611566 to your computer and use it in GitHub Desktop.

Select an option

Save aifrak/a5e14ef1e2f0737935f195c8f3611566 to your computer and use it in GitHub Desktop.
Alias for powershell
# Copy this file in C:\Users\[USER]\Documents\WindowsPowerShell
# Default theme
# oh-my-posh init pwsh | Invoke-Expression
# Use another theme from home folder
# oh-my-posh init pwsh --config ~\thema-test.omp.yml | Invoke-Expression
# Use another theme from scoop folder
# oh-my-posh init pwsh --config C:\Users\[USER]\scoop\apps\oh-my-posh\current\themes\hunk.omp.json | Invoke-Expression
# oh-my-posh init pwsh --config C:\Users\[USER]\scoop\apps\oh-my-posh\current\themes\glowsticks.omp.yaml | Invoke-Expression
# ---------------------------------------------- #
# Aliases #
# ---------------------------------------------- #
Set-Alias -Name ls -Value lsd -Option AllScope
Function lsd_list() { ls -l }
Set-Alias -Name l -Value lsd_list -Option AllScope
Function lsd_all() { ls -a }
Set-Alias -Name la -Value lsd_all -Option AllScope
Function lsd_list_all() { ls -la }
Set-Alias -Name lla -Value lsd_list_all -Option AllScope
Function lsd_tree() { ls --tree }
Set-Alias -Name lt -Value lsd_tree -Option AllScope
Invoke-Expression (&starship init powershell)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment