Created
April 20, 2025 05:11
-
-
Save frederikstroem/0784a23a10d2fafcf920ed471e31b4d3 to your computer and use it in GitHub Desktop.
[2025-04-20 snapshot] Starship custom command for Nushell's Directory Stack (`dirs` module).
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
{ config, pkgs, ... }: | |
{ | |
programs.starship = { | |
enable = true; | |
settings = { | |
custom = { | |
nu_dirs = { | |
disabled = false; | |
description = "Nushell `dirs` module"; | |
shell = [ "nu" "-c" ]; | |
when = "use std/dirs;if not ((dirs | length) > 1) { exit 1 }"; | |
command = "use std/dirs;dirs | length"; | |
symbol = "๐ "; | |
# format = "[$symbol$output]($style) "; | |
style = "bold yellow"; | |
use_stdin = false; | |
# unsafe_no_escape = true; | |
}; | |
}; | |
}; | |
}; | |
} |
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
[custom.nu_dirs] | |
command = "use std/dirs;dirs | length" | |
description = "Nushell `dirs` module" | |
disabled = false | |
shell = ["nu", "-c"] | |
style = "bold yellow" | |
symbol = "๐ " | |
use_stdin = false | |
when = "use std/dirs;if not ((dirs | length) > 1) { exit 1 }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment