My first nushell script to apply and list oh-my-posh themes! Made in my first day with nushell.
Created
October 28, 2023 02:22
-
-
Save duckcantcode/b83ee4cbc02e27e3a1d8412edcf4f25e to your computer and use it in GitHub Desktop.
omp-theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def omp-theme [ | |
| theme?: string | |
| --list | |
| ] { | |
| if $list { | |
| ls -s $"($env.POSH_THEMES_PATH)" | select name | |
| } else { | |
| ^oh-my-posh init nu --config $"\"($env.POSH_THEMES_PATH)/($theme).omp.json\"" | |
| "Restart nu to apply theme." | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment