Better prompt and insert mode cursor
This commit is contained in:
parent
f61c18dab1
commit
2ee3c1d62b
|
@ -18,6 +18,7 @@ end
|
|||
|
||||
function fish_prompt
|
||||
set last_cmd_status $status
|
||||
set prompt_str '$'
|
||||
if test (id -u) -eq 0
|
||||
if test $last_cmd_status -eq 0
|
||||
set_color -b blue black
|
||||
|
@ -25,20 +26,21 @@ function fish_prompt
|
|||
set_color -b red black
|
||||
end
|
||||
printf " SUDO $USER@$hostname "
|
||||
set prompt_str '#'
|
||||
else
|
||||
if test $last_cmd_status -eq 0
|
||||
set_color blue
|
||||
else
|
||||
set_color red
|
||||
end
|
||||
printf %s@%s $USER (echo $hostname | cut -d '.' -f1)
|
||||
printf '%s@%s' $USER (echo $hostname | cut -d '.' -f1)
|
||||
end
|
||||
set_color normal
|
||||
printf " "
|
||||
set_color magenta
|
||||
printf (preprocess_pwd)""
|
||||
set_color normal
|
||||
printf " "
|
||||
printf "%s" (preprocess_pwd)
|
||||
set_color -b black brblack
|
||||
printf "\n$prompt_str "
|
||||
end
|
||||
|
||||
function fish_mode_prompt; end
|
||||
|
|
|
@ -12,6 +12,8 @@ set --export --universal BROWSER firefox-developer-edition
|
|||
set --export --universal PAGER "less"
|
||||
set --export --universal MANPAGER "less"
|
||||
|
||||
set --universal fish_cursor_insert line
|
||||
|
||||
if command --search --quiet helix
|
||||
set --export --universal EDITOR helix
|
||||
set --export --universal VISUAL helix
|
||||
|
|
Reference in a new issue