rliebz / tusk

The modern task runner
https://rliebz.github.io/tusk/
MIT License
236 stars 21 forks source link

quiet commands in tusk.yml #90

Closed ansemjo closed 3 years ago

ansemjo commented 3 years ago

I've been using make as a task-runner so far (*shudder*) and liked using informative / "quiet" commands like this, where the echo is not printed; only the resulting Hello, World!:

.PHONY: hello
hello:
    @echo "Hello, World!"
    ...

This is supported at the commandline level through -q/--quiet already. I found #54 and know that I can also print something else with print: .... But I would like to be able to be "quiet" per command or an entire task – permanently.

I had not opened an issue beforehand because this felt like a rather trivial feature at first; the first commit adds the quietness per command. The second commit took a little longer and adds inheritance from parent tasks in the stack, too. The examples from the docs:

tasks:
  quietTask:
    run:
      - exec: echo "Purely informative step ..."
        quiet: true
  quietParent:
    quiet: true
    run:
      task: info
  quietSubtask:
    run:
      task:
        name: info
        quiet: true
  info:
    run: echo "Purely informative step ..."

Note that inheritance does not work in the third form (quietSubtask) when info is marked as private: true ..

ansemjo commented 3 years ago

Glad you like it! :blush:

I've replied to your feedback and will wait for your reply on how to proceed before I amend the commits accordingly.

rliebz commented 3 years ago

Thanks for the contribution!