diff --git a/common/fish/prompt.fish b/common/fish/prompt.fish index e0aceef..d0d46e5 100644 --- a/common/fish/prompt.fish +++ b/common/fish/prompt.fish @@ -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 diff --git a/common/fish/vars.fish b/common/fish/vars.fish index 2aef5a7..b5c108e 100644 --- a/common/fish/vars.fish +++ b/common/fish/vars.fish @@ -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