fish: add git information to prompt
This commit is contained in:
parent
3926a85577
commit
b7cd81cad2
@ -29,3 +29,5 @@ fish_vi_key_bindings
|
|||||||
|
|
||||||
bind -M insert \ce accept-autosuggestion -m default
|
bind -M insert \ce accept-autosuggestion -m default
|
||||||
bind -M default \ce execute
|
bind -M default \ce execute
|
||||||
|
|
||||||
|
set __fish_git_prompt_showdirtystate 1
|
||||||
|
@ -16,7 +16,10 @@ function fish_right_prompt
|
|||||||
set usercolor (set_color $col)
|
set usercolor (set_color $col)
|
||||||
end
|
end
|
||||||
|
|
||||||
printf '%s%s@%s%s' $usercolor \
|
printf '%s ' \
|
||||||
|
(fish_git_prompt)
|
||||||
|
printf '%s%s@%s%s'\
|
||||||
|
$usercolor \
|
||||||
(echo $USER | string shorten -m 5 -c '') \
|
(echo $USER | string shorten -m 5 -c '') \
|
||||||
(echo $hostname | string shorten -m 1 -c '') \
|
(echo $hostname | string shorten -m 1 -c '') \
|
||||||
(set_color normal)
|
(set_color normal)
|
||||||
|
Loading…
Reference in New Issue
Block a user