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

quotes not properly handled #305

Closed
gnychis opened this issue Oct 24, 2014 · 6 comments
Closed

quotes not properly handled #305

gnychis opened this issue Oct 24, 2014 · 6 comments
Labels
👆 Git Upstream issue in Git for Windows.

Comments

@gnychis
Copy link

gnychis commented Oct 24, 2014

I am having the issue where quotes are not handled very traditionally.

For example, in a traditional console:

$ echo "packages"
packages

In Cmder:

λ echo 'packages'
'packages'
λ echo "packages"
"packages"

This breaks more complex grammar, working in a traditional bash shell:

$ git filter-branch -f --index-filter 'git rm -r --cached --ignore-unmatch bin' --prune-empty --tag-name-filter cat -- --all
Rewrite 4b2293f4807bb3008d983d627423fe2b20cfd723 (2/2)
WARNING: Ref 'refs/heads/master' is unchanged
WARNING: Ref 'refs/remotes/origin/master' is unchanged
WARNING: Ref 'refs/remotes/origin/master' is unchanged

Failing due to the quotes in Cmder:

λ git filter-branch -f --index-filter 'git rm -r --cached --ignore-unmatch bin' --prune-empty --tag-name-filter cat -- --all
fatal: bad revision 'rm'
@MartiUK
Copy link
Member

MartiUK commented Oct 25, 2014

This is a problem with msysgit's echo... I don't know why it doesn't handle quotes correctly.

@MartiUK MartiUK added the 👆 Git Upstream issue in Git for Windows. label Oct 25, 2014
@JokerQyou
Copy link

There's another problem with msysgit which could be connected with this.
git commit -m 'msg' will not work, and git commit -m "msg" will work. This makes sense, but git commit -m "msg also works, which is very confusing for me.
Also I tried to run a batch script which worked fine with cmd, in this script there's code as following:

SET PYINSTALLERPATH="C:\Python27\Scripts"
%PYINSTALLERPATH%\pyinstaller --clean --noconfirm myapp.spec

And this does not work in Cmder. I took a while to figure it out, changing the above codes to this:

SET PYINSTALLERPATH="C:/Python27/Scripts"
%PYINSTALLERPATH%"/pyinstaller" --clean --noconfirm myapp.spec

and it works. But I don't know why.

@NekR
Copy link

NekR commented Jan 15, 2015

There's another problem with msysgit which could be connected with this.
git commit -m 'msg' will not work, and git commit -m "msg" will work. This make sense, but git commit -m "msg also works, which is very confusing for me.

Same for me, very annoying.

@marcoflorian
Copy link

echo "Something" >> file.txt

Prints at the end of the file:

"Something"

Any updates on this?

Is it safe to do it without quotes?

echo Something >> file.txt

Seems to work fine:

Something

@jankatins
Copy link
Contributor

I just tried this with #865 and this is the result:

C:\Users\jschulz
λ which bash
C:\Program Files\Git\bin\bash.exe
C:\Program Files\Git\usr\bin\bash.exe

C:\Users\jschulz
λ bash

jschulz@littlebottom MINGW64 ~
$ echo "hallo"
hallo

@mariotacke
Copy link

Just ran into the same issue. I started bash first, then ran the command in the shell and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👆 Git Upstream issue in Git for Windows.
Projects
None yet
Development

No branches or pull requests

8 participants