https://github.com/bfontaine/task.sh
Easy step-by-step Bash scripts output
https://github.com/bfontaine/task.sh
shell
Last synced: about 2 months ago
JSON representation
Easy step-by-step Bash scripts output
- Host: GitHub
- URL: https://github.com/bfontaine/task.sh
- Owner: bfontaine
- License: mit
- Created: 2014-06-11T21:30:06.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-01-09T16:01:25.000Z (over 7 years ago)
- Last Synced: 2026-04-06T19:41:56.933Z (3 months ago)
- Topics: shell
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# task.sh
``task.sh`` is a little tool made for easy step-by-step Bash scripts. It
provides one function, `task`, which take a command and print it with a
checkbox. When the task complete, it either checks it or write an `F` to mark
it as failed and log its stderr output.
## Install
Download `task.sh` somewhere:
curl -sL 'http://git.io/EgU4Vg' > task.sh
## Usage
Source `task.sh` in Bash:
. task.sh
Then prefix each command with `task`. Be careful to use quotes when you’re
using special Bash characters, like redirections and pipes:
# wrong:
task echo bar > foo
# right:
task 'echo bar > foo'
Right now `task` doesn’t support command output, so you’ll need to redirect any
output (stdout _and_ stderr) somewhere to not mess with `task`’s own output.
This should be improved in the future.
### Example
. path/to/task.sh
task touch foo
task mkdir bar
task mv foo bar/
task sleep 1
task touch bar # will fail
task true
Result:
[x] touch foo
[F] mkdir bar
[x] mv foo bar/
[x] sleep 1
[x] touch bar
[x] true