diff --git a/cli/.config/fish/functions/gwtp.fish b/cli/.config/fish/functions/gwtp.fish index 6b54bb7..9c2fd3d 100644 --- a/cli/.config/fish/functions/gwtp.fish +++ b/cli/.config/fish/functions/gwtp.fish @@ -1,3 +1,3 @@ function gwtp - command git worktree prune $argv + command git worktree prune --verbose end diff --git a/cli/.config/fish/functions/prompt.git.fish b/cli/.config/fish/functions/prompt.git.fish index 6f00bcc..fed6f56 100644 --- a/cli/.config/fish/functions/prompt.git.fish +++ b/cli/.config/fish/functions/prompt.git.fish @@ -1,8 +1,8 @@ function prompt.git - git rev-parse 2>/dev/null || return + git rev-parse 2> /dev/null || return git status --porcelain -bu | while read line if string match -qr "^##" "$line" - set git_branch (string match -r "\ (.+)\.\.\." "$line")[2] + set git_branch (string match -r '[^# .]+' "$line") string match -qr '\[behind' $line && set git_branch "$git_branch?" string match -qr '\[ahead' $line && set git_branch "$git_branch!" prompt.add "$color_git_branch" "$git_sign $git_branch"