mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Properly use starship with Nushell
This commit is contained in:
parent
48b31d4d55
commit
a38e164431
3 changed files with 2 additions and 20 deletions
|
@ -58,7 +58,3 @@ pkgs: with pkgs; []
|
|||
virtualenv
|
||||
poetry
|
||||
]
|
||||
|
||||
++ [ # SHELLS
|
||||
starship
|
||||
]
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{ homeManagerConfiguration, ... }:
|
||||
|
||||
homeManagerConfiguration "nixos" {
|
||||
programs.starship.enable = true;
|
||||
|
||||
programs.nushell.enable = true;
|
||||
programs.nushell = {
|
||||
configFile.source = ./config.nu;
|
||||
|
|
|
@ -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)"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue