Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could use a wrapper that parses all the command-line options. Basically you loop over "$@", look for strings starting with '-' and '--', skip those; then look for a non-option argument, store that as a subcommand; then look for for more '-' and '--' options. Once that's all done you have enough to find subcommand "reset", subcommand option "--hard". About 50 lines of shell script.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: