fish: git prompt and alias fix
This commit is contained in:
parent
5900e5b4b9
commit
ed8d249300
2 changed files with 3 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
|||
function gwtp
|
||||
command git worktree prune $argv
|
||||
command git worktree prune --verbose
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ function prompt.git
|
|||
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"
|
||||
|
|
Loading…
Reference in a new issue