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…
I'm running a series of commands on the command line that takes approximately twenty minutes to complete. I'd like to see some sort of notification on my Mac when these are finished so I don't nee...
When I execute screen -ls, I see the following. How can I kill all the detached sessions?
There are screens on:
84918.ttys002.ros-mbp (Detached)
84944.ttys008.ros-mbp (Detached)Learn how to connect to a shell of a running Docker container and how to start containers interactively
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…
