Closed Nattle closed 11 years ago
It would be useful to paste your output of sub init -
here so we can see what bash tries to eval and fails.
sub init - | pbcopy
# then paste to GitHub
~/kiva/streams/kiva $ kiva init -
export PATH="${PATH}:/Users/mwaxler/kiva/streams/kiva/bin"
source "/Users/mwaxler/kiva/streams/kiva/libexec/../completions/kiva.bash"
kiva() {
local command="$1"
if [ "$#" -gt 0 ]; then
shift
fi
case "$command" in
)
eval `kiva "sh-$command" "$@"`;;
*)
command kiva "$command" "$@";;
esac
}
You should edit your comment and wrap all code between triple tilde (~
) signs at beginning and end. This transforms it into code block.
Any idea what is going on here?
It looks like somehow the shell
after the case
statement got removed. Can you add it back in? Here's the output of sub init -
from inside of the sub dir for me:
export PATH="${PATH}:/Users/qrush/dev/sub/bin"
source "/Users/qrush/dev/sub/libexec/../completions/sub.zsh"
sub() {
local command="$1"
if [ "$#" -gt 0 ]; then
shift
fi
case "$command" in
shell)
eval `sub "sh-$command" "$@"`;;
*)
command sub "$command" "$@";;
esac
}
Yes, that fixed it. Thanks so much for the assistance. I have no idea how that got broken, going back in my source control I dont see it ever being present. I'm going to chalk it up to a stray keystroke at some point.
Thanks again.
When I add the proper line from sub init to my bash_profile it spews the following error: -bash: eval: line 31: syntax error near unexpected token
)' -bash: eval: line 31:
)'This is definitely coming from the sub call. I also tried this format instead, but get the same error. subb=
sub init -
eval "$subb"I can manually call this sequence and it will not produce the same error. sub init- > foo; eval < foo; rm foo
This is all on OSX, in case that is relevant.