diff options
author | Von Random <von@vdrandom.org> | 2023-02-06 13:38:34 +0200 |
---|---|---|
committer | Von Random <von@vdrandom.org> | 2023-02-06 13:38:34 +0200 |
commit | ed8d24930036165e6f8bafce7fd8d04047220198 (patch) | |
tree | bfac16563298975f10239cbe4f4a37a27576e354 | |
parent | 5900e5b4b988616ea12ca295deeb698bfd23e361 (diff) |
fish: git prompt and alias fix
-rw-r--r-- | cli/.config/fish/functions/gwtp.fish | 2 | ||||
-rw-r--r-- | cli/.config/fish/functions/prompt.git.fish | 4 |
2 files changed, 3 insertions, 3 deletions
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" |