mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-24 18:53:51 +08:00
2cea5b8eb1
This prints a description of the "host". Currently that's `(chroot:debianchroot) $USER@$hostname` with the chroot part when needed. This also switches the default and terlar prompts to use it, the other prompts have slightly different coloring or logic here.
27 lines
450 B
Fish
27 lines
450 B
Fish
# name: Terlar
|
|
# author: terlar - https://github.com/terlar
|
|
|
|
function fish_prompt --description 'Write out the prompt'
|
|
set -l last_status $status
|
|
|
|
prompt_login
|
|
|
|
echo -n ':'
|
|
|
|
# PWD
|
|
set_color $fish_color_cwd
|
|
echo -n (prompt_pwd)
|
|
set_color normal
|
|
|
|
__terlar_git_prompt
|
|
fish_hg_prompt
|
|
echo
|
|
|
|
if not test $last_status -eq 0
|
|
set_color $fish_color_error
|
|
end
|
|
|
|
echo -n '➤ '
|
|
set_color normal
|
|
end
|