53 lines
1.6 KiB
Fish
53 lines
1.6 KiB
Fish
set -gx EDITOR hx
|
|
set -gx LANG en_US.UTF-8
|
|
set -gx LESS '-x4 -z-4 -j.25 -iFMRS'
|
|
set -gx PAGER less
|
|
|
|
if status --is-interactive
|
|
# Disable the default shell greeting
|
|
set fish_greeting
|
|
|
|
# Disable the abbreviated directory format
|
|
set fish_prompt_pwd_dir_length 0
|
|
|
|
# If installed, setup z function
|
|
command -q zoxide; and zoxide init fish | source
|
|
|
|
# If installed, setup asdf
|
|
set -q ASDF_DATA_DIR; and fish_add_path --prepend "$ASDF_DATA_DIR/shims"
|
|
|
|
# Git prompt
|
|
set -g __fish_git_prompt_showdirtystate 1
|
|
set -g __fish_git_prompt_showstashstate 1
|
|
set -g __fish_git_prompt_showuntrackedfiles 1
|
|
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_color_branch magenta
|
|
set -g __fish_git_prompt_color_dirtystate cyan
|
|
set -g __fish_git_prompt_color_invalidstate red
|
|
set -g __fish_git_prompt_color_stagedstate cyan
|
|
set -g __fish_git_prompt_color_stashstate cyan
|
|
set -g __fish_git_prompt_color_untrackedfiles cyan
|
|
set -g __fish_git_prompt_color_upstream yellow
|
|
|
|
# Bindings
|
|
bind ctrl-q fkill
|
|
bind ctrl-p __fzf_files
|
|
bind ctrl-g __fzf_git_log
|
|
|
|
# You can get the cancelled command with ctrl-z now
|
|
#bind ctrl-c __fish_cancel_commandline
|
|
|
|
# Shell history
|
|
if command -q atuin
|
|
atuin init fish --disable-up-arrow | source
|
|
else
|
|
bind ctrl-r __fzf_history
|
|
end
|
|
|
|
# By default, Ctrl+L clears the screen
|
|
# Add binding Ctrl+Alt+L to clear screen AND scrollback buffer
|
|
bind ctrl-alt-l 'clear; commandline -f repaint'
|
|
end
|