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

Update to 0.75.1 syntax (#371)

* Update to 0.75.1 syntax

- returns Table() rather than list(Any)
- use $env.PWD

* use pwd from let binding
This commit is contained in:
Hörmet Yiltiz 2023-02-07 14:16:58 -06:00 committed by GitHub
parent 106e56f48b
commit f23fbf5106
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,9 +15,10 @@ def prompt-git-branch [] {
def prompt-create-left-prompt [] { def prompt-create-left-prompt [] {
let pwd = ($env.PWD | str replace $env.HOME '~') let pwd = ($env.PWD | str replace $env.HOME '~')
prompt-concat [ prompt-concat [
{text: $pwd, color: (ansi green_bold)} [text color];
{text: (prompt-git-branch), color: (ansi blue_bold)} [pwd (ansi green_bold)]
{text: (async-git-prompt-string), color: (ansi green_bold)} [(prompt-git-branch) (ansi blue_bold)]
[(async-git-prompt-string) (ansi green_bold)]
] ]
} }