Skip to content

Commit f600f97

Browse files
committed
feat(fish): remove vi bindings and update prompt
1 parent 174338d commit f600f97

2 files changed

Lines changed: 12 additions & 24 deletions

File tree

home/.config/fish/config.fish

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ set -gx EDITOR nvim
88

99
set -g fish_greeting # disable fish greeting
1010
set -g fish_prompt_pwd_dir_length 0
11-
set -g fish_key_bindings fish_vi_key_bindings
12-
13-
set fish_vi_force_cursor 1
14-
set fish_cursor_default block
15-
set fish_cursor_insert line
16-
set fish_cursor_replace_one underscore
17-
set fish_cursor_visual block
11+
set -g fish_transient_prompt 1
1812

1913
#
2014
# Abbreviations
Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
function fish_prompt --description "Write out the prompt"
2-
set -lx __fish_last_status $status # Export for __fish_print_pipestatus
3-
set -l last_pipestatus $pipestatus
4-
set -l cwd (set_color $fish_color_cwd)(prompt_pwd | path basename)
5-
set -l normal (set_color normal)
2+
set -l last_status $status
63
set -q fish_color_status; or set -g fish_color_status red
74

8-
# Write pipestatus
9-
# If the status was carried over, don't bold it.
10-
set -l bold_flag --bold
11-
set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation
12-
if test $__fish_prompt_status_generation = $status_generation
13-
set bold_flag
14-
end
15-
set __fish_prompt_status_generation $status_generation
16-
set -l status_color (set_color $fish_color_status)
17-
set -l statusb_color (set_color $bold_flag $fish_color_status)
18-
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
5+
if contains -- --final-rendering $argv
6+
echo -n "> "
7+
else
8+
echo -s (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) (fish_git_prompt)
199

20-
# echo -n -s $cwd $normal (fish_git_prompt) $normal " "$prompt_status "> "
21-
echo -n -s "> "
10+
if test $last_status -ne 0
11+
set_color $fish_color_status
12+
end
13+
echo -n "> "
14+
set_color normal
15+
end
2216
end

0 commit comments

Comments
 (0)