Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell commands using env variables and spaces fail #370

Open
eebs opened this issue May 3, 2019 · 1 comment
Open

Shell commands using env variables and spaces fail #370

eebs opened this issue May 3, 2019 · 1 comment
Labels

Comments

@eebs
Copy link
Contributor

eebs commented May 3, 2019

I'm not 100% sure what the exact cause or error is, but here are some test cases.

Works:

gitsh (ek-add-docs-to-readme@) ➜ !FOO='foo' git log --oneline -n 1
eeb5015 (HEAD -> ek-add-docs-to-readme, origin/ek-add-docs-to-readme) Add note about `man gitsh` to Readme.

gitsh (ek-add-docs-to-readme@) ➜
gitsh (ek-add-docs-to-readme@) ➜ !echo 'hi there'
hi there

gitsh (ek-add-docs-to-readme@) ➜

Fails:

gitsh (ek-add-docs-to-readme@) ➜ !FOO='foo bar' git log
/bin/sh: bar: command not found

gitsh (ek-add-docs-to-readme@) ➜

In my case git is an alias to hub, though I have tested without hub and the above behavior is still exhibited.

gitsh version 0.14
git version 2.20.1
hub version 2.5.0

@georgebrock
Copy link
Collaborator

@eebs Thanks for the report!

I can reproduce the error, and need to do a bit more research into what's going on. It might be related to #361 , but the bug seems to exist on that branch too.

In the meantime, you can work around it using the env(1) command:

!env FOO='foo bar' git log

@georgebrock georgebrock added the bug label Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants