mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
small tweaks to get panache working again (#365)
This commit is contained in:
parent
81ad123d49
commit
3334cad9aa
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
|
||||
# An opinionated Git prompt for Nushell, styled after posh-git
|
||||
export def panache-git [] {
|
||||
export def prompt-with-panache [] {
|
||||
let prompt = ($'(current-dir) (repo-styled)' | str trim)
|
||||
$'($prompt)> '
|
||||
}
|
||||
|
@ -33,9 +33,9 @@ export def current-dir [] {
|
|||
let in_sub_dir_of_home = ($current_dir_relative_to_home | is-empty | nope)
|
||||
|
||||
let current_dir_abbreviated = (if $in_sub_dir_of_home {
|
||||
$'~(char separator)($current_dir_relative_to_home)'
|
||||
$'~(char separator)($current_dir_relative_to_home)' | str replace -a '\\' '/'
|
||||
} else {
|
||||
$current_dir
|
||||
$current_dir | str replace -a '\\' '/'
|
||||
})
|
||||
|
||||
$'(ansi reset)($current_dir_abbreviated)'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue