Fix Fish shell configuration
- Remove loading asdf env variables - Add loading Homebrew - Move Yazi function to config.fish - Fix Go binary path
This commit is contained in:
@@ -1 +0,0 @@
|
||||
source ~/.asdf/asdf.fish
|
||||
1
fish/.config/fish/conf.d/homebrew.fish
Normal file
1
fish/.config/fish/conf.d/homebrew.fish
Normal file
@@ -0,0 +1 @@
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
@@ -1,14 +1,14 @@
|
||||
## Set values
|
||||
# Hide welcome message & ensure we are reporting fish as shell
|
||||
set fish_greeting
|
||||
set VIRTUAL_ENV_DISABLE_PROMPT "1"
|
||||
set VIRTUAL_ENV_DISABLE_PROMPT 1
|
||||
set -xU MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||
set -xU MANROFFOPT "-c"
|
||||
set -xU MANROFFOPT -c
|
||||
set -x SHELL /usr/bin/fish
|
||||
|
||||
## Export variable need for qt-theme
|
||||
if type "qtile" >> /dev/null 2>&1
|
||||
set -x QT_QPA_PLATFORMTHEME "qt5ct"
|
||||
if type qtile >>/dev/null 2>&1
|
||||
set -x QT_QPA_PLATFORMTHEME qt5ct
|
||||
end
|
||||
|
||||
# Set settings for https://github.com/franciscolourenco/done
|
||||
@@ -32,7 +32,7 @@ end
|
||||
## Starship prompt
|
||||
if status --is-interactive
|
||||
set -l starship_path (which starship)
|
||||
source ("$starship_path" init fish --print-full-init | psub)
|
||||
source ($starship_path init fish --print-full-init | psub)
|
||||
end
|
||||
|
||||
## Advanced command-not-found hook
|
||||
@@ -52,7 +52,8 @@ end
|
||||
function __history_previous_command
|
||||
switch (commandline -t)
|
||||
case "!"
|
||||
commandline -t $history[1]; commandline -f repaint
|
||||
commandline -t $history[1]
|
||||
commandline -f repaint
|
||||
case "*"
|
||||
commandline -i !
|
||||
end
|
||||
@@ -68,7 +69,7 @@ function __history_previous_command_arguments
|
||||
end
|
||||
end
|
||||
|
||||
if [ "$fish_key_bindings" = fish_vi_key_bindings ];
|
||||
if [ "$fish_key_bindings" = fish_vi_key_bindings ]
|
||||
bind -Minsert ! __history_previous_command
|
||||
bind -Minsert '$' __history_previous_command_arguments
|
||||
else
|
||||
@@ -116,6 +117,15 @@ function tmux-session --argument session_name
|
||||
end
|
||||
end
|
||||
|
||||
function yy
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
|
||||
## Useful aliases
|
||||
|
||||
# Replace ls with eza
|
||||
@@ -150,9 +160,8 @@ alias tarnow 'tar -acf '
|
||||
alias untar 'tar -zxvf '
|
||||
alias vdir 'vdir --color=auto'
|
||||
alias wget 'wget -c '
|
||||
alias vi 'nvim'
|
||||
alias vi nvim
|
||||
alias stow 'stow --dotfiles -d ~/.dotfiles '
|
||||
|
||||
# Get the error messages from journalctl
|
||||
alias jctl 'journalctl -p 3 -xb'
|
||||
|
||||
|
||||
@@ -44,4 +44,4 @@ SETUVAR fish_pager_color_description:yellow\x1e\x2di
|
||||
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
||||
SETUVAR fish_user_paths:/var/home/fscotto/\x2elocal/share/go
|
||||
SETUVAR fish_user_paths:/home/fscotto/\x2elocal/share/go/bin
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
function yy
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
Reference in New Issue
Block a user