jez / bask

:sunglasses: Bask in the convenience of a task runner for bash
Other
59 stars 4 forks source link

Does not seem to work well enough with Oh my zsh #3

Closed antonbabenko closed 8 years ago

antonbabenko commented 8 years ago
$ brew install jez/formulae/bask
...
$ bask
/usr/local/Cellar/bask/0.9.0/src/bask.sh: line 19: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/bask.sh: line 30: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/bask.sh: line 36: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/bask.sh: line 37: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/bask.sh: line 39: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/cli.sh: line 6: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/cli.sh: line 7: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/cli.sh: line 10: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/cli.sh: line 18: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/cli.sh: line 19: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/usr/local/Cellar/bask/0.9.0/src/cli.sh: line 20: declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
baskfile: line 9: syntax error near unexpected token `}'
baskfile: line 9: `}'
[\e[0m21:43:36.000\e[0m] Available tasks:
[\e[0m21:43:36.000\e[0m]   \e[0mfoo\e[0m

OS X 10.11.5

jez commented 8 years ago

I can't reproduce this. It should be unaffected by your Zsh version, as bask is forking a new process running /usr/bin/env bash.

What is the output of /usr/bin/env bash --version?

jez commented 8 years ago

It looks like declare -g is not a feature of Bash 4.2. OS X is pegged at Bash 3.x. If you're itching to try things out, you can install Bash 4 from Homebrew:

brew install bash

I'll look into if -g is really necessary.

jez commented 8 years ago

Oh, looks like this is a known issue upstream: https://github.com/stylemistake/bash-task-runner/issues/5

antonbabenko commented 8 years ago

Thanks. Upgraded bash using brew install bash helped.

Good job!