nixos/home/modules/shell/fish/config.fish
2026-02-27 23:44:37 +01:00

32 lines
537 B
Fish

# setup direnv
direnv hook fish | source
# set aliases
source ~/.config/fish/aliases/git.fish
# path
fish_add_path -g ~/bin ~/.config/v-analyzer/bin
# custom
function vir
set dest (command vir $argv)
and cd $dest
end
# prompt functions
function git_branch
set -l branch (git rev-parse --abbrev-ref HEAD 2>/dev/null)
if test $status -eq 0
echo ' ( '$branch')'
else
echo ""
end
end
function nix_shell
if test -n "$IN_NIX_SHELL"
echo " (nix)"
else
echo ""
end
end