function edit-dotfile pushd /home/joe/.dotfiles/ export FZF_DEFAULT_COMMAND='find . -path './.git' -prune -o -print' set file (fzf --height=35% --preview 'echo {}') if test $file set fullpath (readlink -f $file) popd if [ -d $fullpath ] cd $fullpath else nvim $fullpath end end commandline -f repaint end