if status is-interactive
+ # read all vendor completions in /usr/share/fish/vendor_completions.d/
+ for f in /usr/share/fish/vendor_completions.d/*.fish; source $f; end
+
# Commands to run in interactive sessions can go here
- #
+ __fish_cursor_xterm line
+ thefuck --alias | source
source ~/.config/fish/functions/eza-aliases.fish
source ~/.config/fish/functions/git-aliases.fish
set EZA_COLORS "*.patch.skip=38;5;244"
- command -v fastfetch && command fastfetch -c ~/.config/fastfetch/default.jsonc
- source (starship init fish --print-full-init | psub)
set -gx EDITOR 'kak'
set -gx VISUAL 'kak'
zoxide init fish | source
+ starship init fish | source
+ # source (starship init fish --print-full-init | psub)
+ # command -v fastfetch && command fastfetch -c ~/.config/fastfetch/default.jsonc
set -g fish_greeting
end
function l1 --wraps='eza' --description='alias eza'
switch (tty | cut -f1-3 -d'/')
case /dev/tty
- EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first -1 $argv
+ EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first -1 -- $argv
case /dev/pts
- EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first -1 $argv
+ EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first -1 -- $argv
end
end
function ls --wraps='eza' --description='alias eza'
switch (tty | cut -f1-3 -d'/')
case /dev/tty
- EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group-directories-first --icons $argv
+ EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group-directories-first --icons -- $argv
case /dev/pts
- EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group-directories-first --icons $argv
+ EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group-directories-first --icons -- $argv
end
end
function la --wraps='eza' --description='alias eza'
switch (tty | cut -f1-3 -d'/')
case /dev/tty
- EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza -a --group --group-directories-first --icons -l $argv
+ EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza -a --group --group-directories-first --icons -l -- $argv
case /dev/pts
- EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza -a --group --group-directories-first --icons -l $argv
+ EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza -a --group --group-directories-first --icons -l -- $argv
end
end
function lg --wraps='eza' --description='alias eza'
switch (tty | cut -f1-3 -d'/')
case /dev/tty
- EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --long --no-user --smart-group --group-directories-first --git $argv
+ EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --long --no-user --smart-group --group-directories-first --git -- $argv
case /dev/pts
- EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --long --no-user --smart-group --group-directories-first --git $argv
+ EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --long --no-user --smart-group --group-directories-first --git -- $argv
end
end
function ll --wraps='eza' --description='alias eza'
switch (tty | cut -f1-3 -d'/')
case /dev/tty
- EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first --icons -l $argv
+ EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --group-directories-first --icons -l --grid --header -- $argv
case /dev/pts
- EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first --icons -l $argv
+ EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --group-directories-first --icons -l --grid --header -- $argv
end
end
function lt --wraps='eza' --description='alias eza'
switch (tty | cut -f1-3 -d'/')
case /dev/tty
- EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso $argv
+ EZA_ICON_SPACING=2 COLUMNS=160 EZA_GRID_ROWS=13 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso -- $argv
case /dev/pts
- EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso $argv
+ EZA_ICON_SPACING=2 COLUMNS=(tput cols) EZA_GRID_ROWS=26 eza --group --long --grid --group-directories-first --sort=mod -t=mod --time-style=long-iso -- $argv
end
end
+++ /dev/null
-function fish_prompt
- switch "$fish_key_bindings"
- case fish_hybrid_key_bindings fish_vi_key_bindings fish_helix_key_bindings
- set STARSHIP_KEYMAP "$fish_bind_mode"
- case '*'
- set STARSHIP_KEYMAP insert
- end
-
- set STARSHIP_CMD_PIPESTATUS $pipestatus
- set STARSHIP_CMD_STATUS $status
- # Account for changes in variable name between v2.7 and v3.0
- set STARSHIP_DURATION "$CMD_DURATION$cmd_duration"
-
- __starship_set_job_count
-
- if test "$TRANSIENT" = "1"
- set -g TRANSIENT 0
- # Clear from cursor to end of screen as `commandline -f repaint` does not do this
- # See https://github.com/fish-shell/fish-shell/issues/8418
- printf \e\[0J
- if type -q starship_transient_prompt_func
- starship_transient_prompt_func --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
- else
- printf "\e[1;32m❯\e[0m "
- end
- else
- /usr/bin/starship prompt --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
- end
-end