derekwyatt / vim-scala

My work on integration of Scala into Vim - not a ton here, but useful for me.
http://derekwyatt.org
Apache License 2.0
1.09k stars 144 forks source link

bash script in README.md needs fix #145

Closed sinzin91 closed 6 years ago

sinzin91 commented 6 years ago

There needs to be a space before the final semi-colon for it to work:

mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do curl -o ~/.vim/$d/scala.vim https://raw.githubusercontent.com/derekwyatt/vim-scala/master/$d/scala.vim\ ; done
giftig commented 6 years ago

Which shell are you using? That's not how bash works.

Dmitry-Erokhin commented 6 years ago

I think it was zsh. Faced same issue. This shell "helps" you by escaping semicolon on paste and ...la.vim; done becomes ...la.vim\; done. So if you'll add extra space it will not alter original: ...la.vim ; done

giftig commented 6 years ago

I've used zsh before and I recall it doing that for urls to make sure you don't break the urlencoding, so I suspect that's why it's escaped the semicolon. The proper way to fix that would be to single-quote the url instead (which should be done usually anyway, as plenty of common url characters will be interpreted as glob characters and break it even in bash, and it's just fortunate this url doesn't contain any)

I can't confirm that fix as I don't currently have zsh, but pretty sure that'll do it.

giftig commented 6 years ago

Actually I just tried with a zsh docker container and can't reproduce the problem. Is that escaping not a feature of the terminal emulator, rather than your shell? I can't imagine how the shell would even do it itself, it hasn't received input by that point. Which terminal emulator are you using? I seem to recall behaviour similar to what you describe with iterm2 on mac OSX.

derekwyatt commented 6 years ago

Zsh has lots of interesting options that get more complicated if you're using oh-my-zsh. I suspect you've got something interesting set there. At any rate this isn't a real issue so I'll be closing it.

On Sun, Dec 31, 2017, 7:58 AM Rob Moore, notifications@github.com wrote:

Actually I just tried with a zsh docker container and can't reproduce the problem. Is that escaping not a feature of the terminal emulator, rather than your shell? I can't imagine how the shell would even do it itself, it hasn't received input by that point. Which terminal emulator are you using? I seem to recall behaviour similar to what you describe with iterm2 on mac OSX.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/derekwyatt/vim-scala/issues/145#issuecomment-354602456, or mute the thread https://github.com/notifications/unsubscribe-auth/AADzdCfvdGr7hUbbd6G990IZC2o2_NR7ks5tF4UPgaJpZM4PjHVQ .