summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVon Random <von@vdrandom.org>2023-02-06 13:38:34 +0200
committerVon Random <von@vdrandom.org>2023-02-06 13:38:34 +0200
commited8d24930036165e6f8bafce7fd8d04047220198 (patch)
treebfac16563298975f10239cbe4f4a37a27576e354
parent5900e5b4b988616ea12ca295deeb698bfd23e361 (diff)
fish: git prompt and alias fix
-rw-r--r--cli/.config/fish/functions/gwtp.fish2
-rw-r--r--cli/.config/fish/functions/prompt.git.fish4
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"