Tool for writing and running commands from a command directory.
-
MyCmd is a tool to execute scripts found in directories in the MyCmd Search Path. Each of these scripts are in a hierarchical structure.
-
A script that is executed is called a command.
-
However, the command script isn't run directly by the user.
mycmd
is a launcher that sets everything up and then runs the specified command. When launching, the hierarchy is specified by spaces, and not slashes. -
Each command is part of a command group. Command groups are hierarchical.
mycmd
is the implicit top level command group. The command group is the mechanism for grouping related commands together, and also for code reuse. The command group consists of a directory named for the command group, as well as a shell library, by convention the command group name suffixed by-lib
. -
MyCmd also provides a set of common routines that make writing commands easier.
Read the development log for MyCmd here.
- After reading Ian Henry's post, sd: my script directory, and realizing the haphazard way I was throwing together scripts at work, I saw that a similar approach could work for me, giving me reuse for common tasks. It has indeed made my life a lot better. My
mycmd
user directory at work now has over 30 scripts spread across over 15 command groups, and it's infinitely easier for me to create one-off scripts that re-use existing functionality from my other commands and command groups.
MyCmd is licensed under the MIT license and includes other open source software developed by contributors to their respective projects.
These other libraries included in the vendor
subdirectory have their own licenses, acknowledged here:
bashup.events
: Licensed under the CC0 License. The project repository is at https://github.com/bashup/events/tree/bash44.ansi
: Licensed under the MIT License with a non-advertising clause. The project repository is at https://github.com/fidian/ansi.
Additionally, these libraries used for testing MyCmd included in the testing/vendor
subdirectory have their own licenses, acknowledged here:
shunit2
: Licensed under the Apache License 2.0. The project repository is at https://github.com/kward/shunit2.