Modified gitignore

This commit is contained in:
Eduard Urbach 2023-08-23 23:04:10 +02:00
parent 99325b98cf
commit deed39eb0e
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
2 changed files with 32 additions and 1 deletions

27
.config/nushell/prompt.nu Normal file
View File

@ -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 = {|| "::: " }

6
.gitignore vendored
View File

@ -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