fish: remove version check for fish v4
This commit is contained in:
parent
5f3cd562e3
commit
7d7e64f771
@ -24,10 +24,5 @@ abbr -a gr 'git restore'
|
||||
abbr -a gs 'git status'
|
||||
abbr -a gst 'git stash'
|
||||
abbr -a gsw 'git switch'
|
||||
|
||||
set -l major_version (string sub --length 1 $version)
|
||||
|
||||
if test $major_version -ge 4
|
||||
abbr -a --command git rbi 'rebase --interactive'
|
||||
abbr -a --command git wipe 'restore --staged --worktree'
|
||||
end
|
||||
abbr -a --command git rbi 'rebase --interactive'
|
||||
abbr -a --command git wipe 'restore --staged --worktree'
|
||||
|
@ -23,7 +23,6 @@ if status --is-interactive
|
||||
set -g __fish_git_prompt_showupstream informative
|
||||
set -g __fish_git_prompt_char_upstream_ahead '↑'
|
||||
set -g __fish_git_prompt_char_upstream_behind '↓'
|
||||
set -g __fish_git_prompt_char_upstream_prefix ' '
|
||||
set -g __fish_git_prompt_color_branch magenta
|
||||
set -g __fish_git_prompt_color_dirtystate cyan
|
||||
set -g __fish_git_prompt_color_invalidstate red
|
||||
@ -33,16 +32,9 @@ if status --is-interactive
|
||||
set -g __fish_git_prompt_color_upstream yellow
|
||||
|
||||
# Bindings
|
||||
set -l major_version (string sub --length 1 $version)
|
||||
if test $major_version -ge 4
|
||||
bind ctrl-q fkill
|
||||
bind ctrl-p __fzf_files
|
||||
bind ctrl-g __fzf_git_log
|
||||
else
|
||||
bind \cq fkill
|
||||
bind \cp __fzf_files
|
||||
bind \cg __fzf_git_log
|
||||
end
|
||||
|
||||
# You can get the cancelled command with ctrl-z now
|
||||
#bind ctrl-c __fish_cancel_commandline
|
||||
@ -51,18 +43,10 @@ if status --is-interactive
|
||||
if command -q atuin
|
||||
atuin init fish --disable-up-arrow | source
|
||||
else
|
||||
if test $major_version -ge 4
|
||||
bind ctrl-r __fzf_history
|
||||
else
|
||||
bind \cr __fzf_history
|
||||
end
|
||||
end
|
||||
|
||||
# By default, Ctrl+L clears the screen
|
||||
# Add binding Ctrl+Alt+L to clear screen AND scrollback buffer
|
||||
if test $major_version -ge 4
|
||||
bind ctrl-alt-l 'clear; commandline -f repaint'
|
||||
else
|
||||
bind \e\f 'clear; commandline -f repaint'
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user