From 0bdcb7ed529009e92c4225fbede9758216372aea Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 29 Jun 2021 14:21:14 -0500 Subject: [PATCH] trim works a little differently now, updating examples --- prompt/left_and_right_prompt.nu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prompt/left_and_right_prompt.nu b/prompt/left_and_right_prompt.nu index c077612..4b10ad4 100644 --- a/prompt/left_and_right_prompt.nu +++ b/prompt/left_and_right_prompt.nu @@ -12,7 +12,7 @@ def construct_prompt [] { # the current bit branch # let git_status = (git -c core.quotepath=false -c color.status=false status -uall --short --branch) - let git_info = (do -i { git rev-parse --abbrev-ref HEAD } | str trim | str collect ) + let git_info = (do -i { git rev-parse --abbrev-ref HEAD } | str trim -c (char nl) | str collect ) # what to put in the title let title_bar = (set_title) @@ -73,7 +73,7 @@ def home_abbrev [] { # Get Git Info custom commands def git_br [] { - $"(ansi gb)(pwd)(ansi reset)(char lparen)(ansi cb)(do -i { git rev-parse --abbrev-ref HEAD } | str trim | str collect)(ansi reset)(char rparen)(char newline)(ansi yb)(date now | date format '%m/%d/%Y %I:%M:%S%.3f %p')(ansi reset)¯\\_(ツ)_/¯(char prompt) " + $"(ansi gb)(pwd)(ansi reset)(char lparen)(ansi cb)(do -i { git rev-parse --abbrev-ref HEAD } | str trim -c (char nl) | str collect)(ansi reset)(char rparen)(char newline)(ansi yb)(date now | date format '%m/%d/%Y %I:%M:%S%.3f %p')(ansi reset)¯\\_(char lparen)ツ)_/¯(char prompt) " } # Set Title String custom commands