Adapts fish config

This commit is contained in:
Dennis Schoepf 2025-01-27 23:10:47 +01:00
parent 640eccae4c
commit 8b9e750908

View file

@ -7,13 +7,20 @@
set RG_PREFIX "rg --column --line-number --no-heading --color=always --smart-case "
set INITIAL_QUERY "$argv"
fzf --ansi --disabled --query "$INITIAL_QUERY" \
--bind "start:reload:$RG_PREFIX {q}" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--bind "start:reload:$RG_PREFIX {q}" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--delimiter : \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
--bind 'enter:become(nvim {1} +{2})'
'';
envsource = ''
for line in (cat $argv | grep -v '^#')
set item (string split -m 1 '=' $line)
set -gx $item[1] $item[2]
echo "Exported key $item[1]"
end
'';
fish_greeting = "fortune -a";
};
@ -31,6 +38,8 @@
fish_add_path /run/current-system/sw/bin
fish_add_path /opt/homebrew/bin
envsource ~/.env
fnm env --use-on-cd --shell fish | source
'';