dotfiles/.config/fish/functions/nv.fish

18 lines
562 B
Fish

function nv --description 'nvchecker script' -a cmd
if test $cmd = show
cat ~/.config/nvchecker/new_ver.json
else
nvchecker
echo Changes:\n
nvcmp
echo \nDo you want to mark the updates as applied?
set -l prompt Type UPDATE to run `nvtake --all`, anything else to quit': '
read -l response --prompt-str="$prompt"
# clear prompt
printf "\033[1A\033[2K"
printf "\033[1A\033[2K"
if test "$response" = UPDATE; or return 0
nvtake --all
end
end
end