1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 19:17:45 +00:00

Properly use starship with Nushell

This commit is contained in:
RGBCube 2023-05-07 23:27:56 +03:00
parent 48b31d4d55
commit a38e164431
3 changed files with 2 additions and 20 deletions

View file

@ -58,7 +58,3 @@ pkgs: with pkgs; []
virtualenv
poetry
]
++ [ # SHELLS
starship
]

View file

@ -1,6 +1,8 @@
{ homeManagerConfiguration, ... }:
homeManagerConfiguration "nixos" {
programs.starship.enable = true;
programs.nushell.enable = true;
programs.nushell = {
configFile.source = ./config.nu;

View file

@ -24,19 +24,3 @@ let-env NU_PLUGIN_DIRS = [
| path dirname
| path join 'plugins')
]
let-env STARSHIP_SHELL = "nu"
let-env STARSHIP_SESSION_KEY = (random chars -l 16)
let-env PROMPT_INDICATOR = ""
let-env PROMPT_MULTILINE_INDICATOR = (^/run/current-system/sw/bin/starship prompt --continuation)
let-env PROMPT_COMMAND = { ||
let width = (term size | get columns)
^/run/current-system/sw/bin/starship prompt $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
}
let-env PROMPT_COMMAND_RIGHT = { ||
let width = (term size | get columns)
^/run/current-system/sw/bin/starship prompt --right $"--cmd-duration=($env.CMD_DURATION_MS)" $"--status=($env.LAST_EXIT_CODE)" $"--terminal-width=($width)"
}