mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-12-11 20:54:36 +08:00
15 lines
531 B
Fish
15 lines
531 B
Fish
function fish_prompt
|
|
if [ (git_branch_name) ]
|
|
if [ (is_git_dirty) ]
|
|
set git_dirty "✗"
|
|
|
|
printf '%s➜ %s %s git:(%s%s%s) %s ' (set_color red) (set_color blue) (basename (prompt_pwd)) (set_color red) (git_branch_name) (set_color blue) $git_dirty
|
|
else
|
|
printf '%s➜ %s %s git:(%s%s%s) ' (set_color red) (set_color blue) (basename (prompt_pwd)) (set_color red) (git_branch_name) (set_color blue)
|
|
end
|
|
else
|
|
printf '%s➜ %s %s ' (set_color red) (set_color blue) (basename (prompt_pwd))
|
|
end
|
|
end
|
|
|