1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-02 15:17:47 +00:00

small tweaks to get panache working again (#365)

This commit is contained in:
Darren Schroeder 2023-01-27 07:14:35 -06:00 committed by GitHub
parent 81ad123d49
commit 3334cad9aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@
# An opinionated Git prompt for Nushell, styled after posh-git # 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) let prompt = ($'(current-dir) (repo-styled)' | str trim)
$'($prompt)> ' $'($prompt)> '
} }
@ -33,9 +33,9 @@ export def current-dir [] {
let in_sub_dir_of_home = ($current_dir_relative_to_home | is-empty | nope) let in_sub_dir_of_home = ($current_dir_relative_to_home | is-empty | nope)
let current_dir_abbreviated = (if $in_sub_dir_of_home { 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 { } else {
$current_dir $current_dir | str replace -a '\\' '/'
}) })
$'(ansi reset)($current_dir_abbreviated)' $'(ansi reset)($current_dir_abbreviated)'