-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi!
Before I start proposing a PR, I'd like to know whether you'd be open to the addition of a "task option" concept.
A couple of UX ideas:
# Leaner, but would require "reserved" option words (`tags`, `projects`, `paths`, ...) not to collide with Mani's own options
mani run <task> --tags <tag> --foo "abc" --bar
# Verbose (and kind of ugly), but allows for any option to be defined
mani run <task> --tags <tag> --option-foo "abc" --option-bar
# Perhaps a good-enough compromise to differentiate between Mani's options and task options?
mani run <task> --tags <tag> -- --foo "abc" --barAnd the configuration file could look like that:
tasks:
commit-push:
options:
message:
desc: Commit message.
required: true
push:
desc: Push changes to the remote.
type: bool
default: false
cmd: |
git commit -m ${message}
# The `push` option is injected as a variable, accessible as such
if [ "${push}" = 1 ]; then
git push
fito be used as:
mani run commit-push --tags <tag> --message "add something cool" --pushThoughts?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request