I wanted to edit the indent information and ended up adding a --help and --verbose flag. That way, if the user types mmdir folder --help, the script is interrupted and the following message appears:
HELP
For detailed info and issue handling, visit source at https://github.com/JohnByrneRepo/mddir
available flags:
--help : this flag!
--verbose : prints folder information
--indent=2 : changes indentation at output file. Insert a number starting from 1.
The script won't run with the --help flag.
The always on verbose setting bothered me, so I've implemented a --verbose flag as well. If you mddir folder --verbose, the script show all folders info. If not, a simple line logs that the script is running. Clean and neat.
I had to wrap almost the entire file in a run function, that's called at the end — that way any other script-ending functionalities can be added later.
If this propose is accepted, adding more ignored folders will be a breeze with a --ignored flag.
Making a few changes to add flag functionality.
I wanted to edit the indent information and ended up adding a
--help
and--verbose
flag. That way, if the user typesmmdir folder --help
, the script is interrupted and the following message appears:The always on verbose setting bothered me, so I've implemented a --verbose flag as well. If you
mddir folder --verbose
, the script show all folders info. If not, a simple line logs that the script is running. Clean and neat.I had to wrap almost the entire file in a
run
function, that's called at the end — that way any other script-ending functionalities can be added later.If this propose is accepted, adding more ignored folders will be a breeze with a
--ignored
flag.