DEV Community

Tea Reggi
Tea Reggi

Posted on • Edited on

Bash Flag Conventions

I've been thinking about bash / shell flag conventions a bunch lately. I was considering creating a list of commonly shared flags. If you're making a script and you want to create a flag, it could be confusing to use -v for --velociraptor, because it's more commonly used for version.

flag description examples
-C Set's working path git, npm
-h Output help git, mongo
--help Output help node, git
-v Output version node, ruby
--version Output version mongo, node, git
--dry-run Detail's action npm
-v Verbose Output bash
--verbose Verbose Output bash

Please comment below and I'll add them to the list. Please provide two scripts that use this flag.

Related:

Top comments (0)