1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-29 21:27:47 +00:00
nu_scripts/modules/prompt
Filipp Samoilov 2e39c27560
Fix error in non-home paths (#1129)
Before it would fail in paths outside the home directory with

```
 × Pipeline empty.
    ╭─[/home/filipp/.config/nushell/panache-git.nu:32:76]
 31 │   let current_dir_relative_to_home = (
 32 │     do --ignore-errors { $current_dir | path relative-to $nu.home-path } | str join
    ·                                                                            ────┬───
    ·                                                                                ╰── no input value was piped in
 33 │   )
    ╰────
```
2025-06-09 06:09:18 -05:00
..
async_git_prompt Replace use of $nothing with null (#621) 2023-09-26 18:52:49 +02:00
images Add a git prompt (#555) 2023-07-19 06:24:54 -05:00
powerline Rename range to slice (#1014) 2025-01-17 06:26:29 -06:00
basic-git.nu Basic git improvements (#1082) 2025-04-14 05:59:27 -05:00
full-line.nu Fix typos (#982) 2024-11-21 23:51:05 -05:00
git_status_prompt.nu Port before_v0.60/config_management before_v0.60/language before_v0.60/prompt before_v0.60/tests (#851) 2024-05-26 12:37:01 -05:00
jalon-git.nu update jalon-git.nu to latest nushell syntax (#748) 2024-01-25 11:47:11 -06:00
left_and_right_prompt.nu Fix typos (#982) 2024-11-21 23:51:05 -05:00
oh-my-minimal.nu Remove some outdated comments (#1008) 2025-01-02 09:50:14 -06:00
oh-my-v2-docs.md use $env. instead of let-env (#543) 2023-07-01 10:40:16 +02:00
oh-my-v2.nu Fix typos (#982) 2024-11-21 23:51:05 -05:00
oh-my.nu Remove some outdated comments (#1008) 2025-01-02 09:50:14 -06:00
panache-git.nu Fix error in non-home paths (#1129) 2025-06-09 06:09:18 -05:00
README.md use typos for corrections (#833) 2024-05-08 06:47:54 -05:00
shell_space.nu rename date format to format date (#571) 2023-08-04 09:08:10 -05:00
simple.nu refactor: (#418) 2023-04-25 17:56:25 -05:00
starship.nu use $env. instead of let-env (#543) 2023-07-01 10:40:16 +02:00

Prompt Scripts

Definition

These scripts should be used to draw a custom command prompt in nushell. They can include anything that we think is appropriate for prompts such as git commands, starship, oh-my-posh, etc.

starship.nu

File is in starship

This describe how to use starship to make a leftprompt, the repo of starship is here.

This script set the output of starship as leftprompt

starshipshow

shell_space.nu

File is in shell_space

Use the function of shells in nu, you can view the function with the command following

help shells

shell_spaceshow

jalon-git.nu

From https://github.com/JalonWong/nushell-prompt jalon-git