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

doc: make Windows command look more Windowsy #1182

Closed
wants to merge 1 commit into from

Conversation

refack
Copy link
Contributor

@refack refack commented Apr 23, 2017

Follow up to #1152

@gibfahn
Copy link
Member

gibfahn commented Apr 23, 2017

Would bat or cmd make more sense see language options?

@refack
Copy link
Contributor Author

refack commented Apr 23, 2017

I thought about it but it's not a script it's a ShellSession ...

@gibfahn
Copy link
Member

gibfahn commented Apr 23, 2017

I thought about it but it's not a script it's a ShellSession ...

Sure, but ShellSession applies to bash as well, and is there a difference between interactively running commands and running them in a batch file (again, genuine question, there isn't in Bash, which is why we can use bash).

@refack
Copy link
Contributor Author

refack commented Apr 23, 2017

If I had used cmd keywords ```cmd would have been more informative...

Yes there are differences:

  1. First of all there's the prompt ($ or xxx>) showing in each line, for both environments.
  2. cmd has a weird this with variables. In an interactive session there are late revoled, and in a batch they are early resolved. so in an interactive session you would write:
FOR %i IN (1,2,3,4) DO ECHO %i

but in a batch you have to escape them:

FOR %%i IN (1,2,3,4) DO ECHO %%i
  1. cmd doesn't have function so there's a weird thing about multiline statements, but I'm not getting into that...

@refack
Copy link
Contributor Author

refack commented May 22, 2017

Not worth the bother.

@refack refack closed this May 22, 2017
@refack refack deleted the readme-for-windows branch May 22, 2017 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants