Compare commits
No commits in common. "689622df6f6a60cd550584ae6097980e02878d3a" and "5f3cd562e3bdb66d2968974eb089f8affcf26c39" have entirely different histories.
689622df6f
...
5f3cd562e3
@ -24,5 +24,10 @@ abbr -a gr 'git restore'
|
|||||||
abbr -a gs 'git status'
|
abbr -a gs 'git status'
|
||||||
abbr -a gst 'git stash'
|
abbr -a gst 'git stash'
|
||||||
abbr -a gsw 'git switch'
|
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 rbi 'rebase --interactive'
|
||||||
abbr -a --command git wipe 'restore --staged --worktree'
|
abbr -a --command git wipe 'restore --staged --worktree'
|
||||||
|
end
|
||||||
|
@ -14,7 +14,7 @@ if status --is-interactive
|
|||||||
command -q zoxide; and zoxide init fish | source
|
command -q zoxide; and zoxide init fish | source
|
||||||
|
|
||||||
# If installed, setup asdf
|
# If installed, setup asdf
|
||||||
set -q ASDF_DATA_DIR; and fish_add_path --prepend "$ASDF_DATA_DIR/shims"
|
command -q asdf; and source (brew --prefix asdf)/libexec/asdf.fish
|
||||||
|
|
||||||
# Git prompt
|
# Git prompt
|
||||||
set -g __fish_git_prompt_showdirtystate 1
|
set -g __fish_git_prompt_showdirtystate 1
|
||||||
@ -23,6 +23,7 @@ if status --is-interactive
|
|||||||
set -g __fish_git_prompt_showupstream informative
|
set -g __fish_git_prompt_showupstream informative
|
||||||
set -g __fish_git_prompt_char_upstream_ahead '↑'
|
set -g __fish_git_prompt_char_upstream_ahead '↑'
|
||||||
set -g __fish_git_prompt_char_upstream_behind '↓'
|
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_branch magenta
|
||||||
set -g __fish_git_prompt_color_dirtystate cyan
|
set -g __fish_git_prompt_color_dirtystate cyan
|
||||||
set -g __fish_git_prompt_color_invalidstate red
|
set -g __fish_git_prompt_color_invalidstate red
|
||||||
@ -32,9 +33,16 @@ if status --is-interactive
|
|||||||
set -g __fish_git_prompt_color_upstream yellow
|
set -g __fish_git_prompt_color_upstream yellow
|
||||||
|
|
||||||
# Bindings
|
# Bindings
|
||||||
|
set -l major_version (string sub --length 1 $version)
|
||||||
|
if test $major_version -ge 4
|
||||||
bind ctrl-q fkill
|
bind ctrl-q fkill
|
||||||
bind ctrl-p __fzf_files
|
bind ctrl-p __fzf_files
|
||||||
bind ctrl-g __fzf_git_log
|
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
|
# You can get the cancelled command with ctrl-z now
|
||||||
#bind ctrl-c __fish_cancel_commandline
|
#bind ctrl-c __fish_cancel_commandline
|
||||||
@ -43,10 +51,18 @@ if status --is-interactive
|
|||||||
if command -q atuin
|
if command -q atuin
|
||||||
atuin init fish --disable-up-arrow | source
|
atuin init fish --disable-up-arrow | source
|
||||||
else
|
else
|
||||||
|
if test $major_version -ge 4
|
||||||
bind ctrl-r __fzf_history
|
bind ctrl-r __fzf_history
|
||||||
|
else
|
||||||
|
bind \cr __fzf_history
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# By default, Ctrl+L clears the screen
|
# By default, Ctrl+L clears the screen
|
||||||
# Add binding Ctrl+Alt+L to clear screen AND scrollback buffer
|
# 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'
|
bind ctrl-alt-l 'clear; commandline -f repaint'
|
||||||
|
else
|
||||||
|
bind \e\f 'clear; commandline -f repaint'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user