Modified gitignore
This commit is contained in:
parent
99325b98cf
commit
deed39eb0e
27
.config/nushell/prompt.nu
Normal file
27
.config/nushell/prompt.nu
Normal 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
6
.gitignore
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user