Compare commits
2 Commits
5f3cd562e3
...
689622df6f
Author | SHA1 | Date | |
---|---|---|---|
689622df6f | |||
7d7e64f771 |
@ -24,10 +24,5 @@ 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'
|
||||||
|
abbr -a --command git rbi 'rebase --interactive'
|
||||||
set -l major_version (string sub --length 1 $version)
|
abbr -a --command git wipe 'restore --staged --worktree'
|
||||||
|
|
||||||
if test $major_version -ge 4
|
|
||||||
abbr -a --command git rbi 'rebase --interactive'
|
|
||||||
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
|
||||||
command -q asdf; and source (brew --prefix asdf)/libexec/asdf.fish
|
set -q ASDF_DATA_DIR; and fish_add_path --prepend "$ASDF_DATA_DIR/shims"
|
||||||
|
|
||||||
# Git prompt
|
# Git prompt
|
||||||
set -g __fish_git_prompt_showdirtystate 1
|
set -g __fish_git_prompt_showdirtystate 1
|
||||||
@ -23,7 +23,6 @@ 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
|
||||||
@ -33,16 +32,9 @@ 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)
|
bind ctrl-q fkill
|
||||||
if test $major_version -ge 4
|
bind ctrl-p __fzf_files
|
||||||
bind ctrl-q fkill
|
bind ctrl-g __fzf_git_log
|
||||||
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
|
# You can get the cancelled command with ctrl-z now
|
||||||
#bind ctrl-c __fish_cancel_commandline
|
#bind ctrl-c __fish_cancel_commandline
|
||||||
@ -51,18 +43,10 @@ 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