From deed39eb0e9891829c74f361f73a4807549c1507 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 23 Aug 2023 23:04:10 +0200 Subject: [PATCH] Modified gitignore --- .config/nushell/prompt.nu | 27 +++++++++++++++++++++++++++ .gitignore | 6 +++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .config/nushell/prompt.nu diff --git a/.config/nushell/prompt.nu b/.config/nushell/prompt.nu new file mode 100644 index 0000000..d49d2e5 --- /dev/null +++ b/.config/nushell/prompt.nu @@ -0,0 +1,27 @@ +def prompt [] { + mut home = "" + + try { + if $nu.os-info.name == "windows" { + $home = $env.USERPROFILE + } else { + $home = $env.HOME + } + } + + let dir = ([ + ($env.PWD | str substring 0..($home | str length) | str replace $home "~"), + ($env.PWD | str substring ($home | str length)..) + ] | str join) + + let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold }) + let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold }) + let path_segment = $"($path_color)($dir)" + + $path_segment | str replace --all (char path_sep) $"($separator_color)/($path_color)" +} + +$env.PROMPT_COMMAND = {|| prompt} +$env.PROMPT_COMMAND_RIGHT = "" +$env.PROMPT_INDICATOR = " " +$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " } diff --git a/.gitignore b/.gitignore index 62d712e..0db58eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,14 @@ /* *.bak +*.txt +*.sqlite3 +*.sqlite3-shm +*.sqlite3-wal !.gitignore !/.config /.config/* !/.config/nvim -!/.config/nushell/*.nu +!/.config/nushell !/.config/tmux !/.config/alacritty !/.config/htop