Skip to content

Commit

Permalink
Merge pull request #76 from AliciaBytes/nushell
Browse files Browse the repository at this point in the history
Add some initial nushell setup
  • Loading branch information
AliciaBytes authored Oct 19, 2024
2 parents d03ee5f + b196107 commit 631d8eb
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dot_config/nushell/config.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$enf.config = {
show_banner: false,
}
1 change: 1 addition & 0 deletions dot_config/nushell/env.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$env.EDITOR = ["code", "--wait"]
38 changes: 38 additions & 0 deletions dot_config/nushell/scripts/starship.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# this file is both a valid
# - overlay which can be loaded with `overlay use starship.nu`
# - module which can be used with `use starship.nu`
# - script which can be used with `source starship.nu`
export-env { $env.STARSHIP_SHELL = "nu"; load-env {
STARSHIP_SESSION_KEY: (random chars -l 16)
PROMPT_MULTILINE_INDICATOR: (
^/home/aliciabytes/.cargo/bin/starship prompt --continuation
)
# Does not play well with default character module.
# TODO: Also Use starship vi mode indicators?
PROMPT_INDICATOR: ""
PROMPT_COMMAND: {||
# jobs are not supported
(
^/home/aliciabytes/.cargo/bin/starship prompt
--cmd-duration $env.CMD_DURATION_MS
$"--status=($env.LAST_EXIT_CODE)"
--terminal-width (term size).columns
)
}

config: ($env.config? | default {} | merge {
render_right_prompt_on_last_line: true
})

PROMPT_COMMAND_RIGHT: {||
(
^/home/aliciabytes/.cargo/bin/starship prompt
--right
--cmd-duration $env.CMD_DURATION_MS
$"--status=($env.LAST_EXIT_CODE)"
--terminal-width (term size).columns
)
}
}}

0 comments on commit 631d8eb

Please sign in to comment.