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
|
function gwtp
|
||||||
command git worktree prune $argv
|
command git worktree prune --verbose
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
function prompt.git
|
function prompt.git
|
||||||
git rev-parse 2>/dev/null || return
|
git rev-parse 2> /dev/null || return
|
||||||
git status --porcelain -bu | while read line
|
git status --porcelain -bu | while read line
|
||||||
if string match -qr "^##" "$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 '\[behind' $line && set git_branch "$git_branch?"
|
||||||
string match -qr '\[ahead' $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"
|
prompt.add "$color_git_branch" "$git_sign $git_branch"
|
||||||
|
|
Loading…
Reference in a new issue