248 Teilen
4 Ergebnisse
markiert
#fish
function foo --description "Example argparse usage"
set --local options 'h/help' 'n/count=!_validate_int --min 1'
argparse $options -- $argv
if set --query _flag_help
printf "Usage: foo [OPTIONS]\n\n"
printf "Options:\n"
printf " -h/--help Prints help and exits\n"
printf " -n/--count=NUM Count (minimum 1, default 10)"
return 0
end
set --query _flag_count; or set --local _flag_count 10
for i in (seq $_flag_count); echo foo; end
endI had used bash for several years. But I felt I couldn’t finish some tasks efficiently sometimes. This was the main motivation to start using fish for me. Fish is a great shell. I believe the biggest…
If you’re using fish shell on macOS and want to use nvm, here are the steps I took to accomplish it using brew and bass. The above message is returned after brew installs nvm. Brew install also…
