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

"rustlings" command output is unreadable when run in Windows 7 cmd #122

Closed
TobiasWehrum opened this issue Mar 17, 2019 · 10 comments
Closed
Labels
A-source Area: CLI source C-bug Category: Bug

Comments

@TobiasWehrum
Copy link

TobiasWehrum commented Mar 17, 2019

Hello,

I've just installed rustlings according to the Windows instructions. When I execute rustlings, here is what I see:

cmd_2019-03-17_02-05-56

I've also tried running it in bash and powershell with the same result.

@TobiasWehrum TobiasWehrum changed the title "rustlings" command is unreadable when run on Windows "rustlings" command output is unreadable when run on Windows Mar 17, 2019
@TobiasWehrum TobiasWehrum changed the title "rustlings" command output is unreadable when run on Windows "rustlings" command output is unreadable when run on Windows 7 Mar 17, 2019
@TobiasWehrum TobiasWehrum changed the title "rustlings" command output is unreadable when run on Windows 7 "rustlings" command output is unreadable when run in Windows 7 cmd Mar 17, 2019
@TobiasWehrum
Copy link
Author

Alright, so what I believe to be ANSI escape sequences show up correctly in ANSICON. That's not perfect (I'd much rather use the CMD), but at least I can use it now.

@TobiasWehrum
Copy link
Author

A few steps further down the line: Running ansicon -i apparently patches my system so that cmd.exe also supports the ANSI escape sequences now. I'm happy with that result.

For other people running Windows 7 it might help to either investigate how to display it properly without installing/running anything (this StackOverflow answer suggests it's possible with C) or to add a note to the readme that they might want to download and run ansicon with the -i flag if the rustlings output looks all jumbled up.

@komaeda
Copy link
Contributor

komaeda commented Mar 17, 2019

i would classify this as a bug if it doesn't run correctly on an unmodified windows version

@komaeda komaeda added C-bug Category: Bug A-source Area: CLI source E-help-wanted labels Mar 17, 2019
@komaeda
Copy link
Contributor

komaeda commented Mar 20, 2019

if anyone who runs windows could help me debug this, that'd be appreciated!

@TobiasWehrum
Copy link
Author

Ready! What do you need?

@TobiasWehrum
Copy link
Author

Oh, unless you need that person to actually know anything about Rust as opposed to e.g. execute and try things for you. I'm a complete newbie.

@komaeda
Copy link
Contributor

komaeda commented Mar 20, 2019

@TobiasWehrum i've been wanting to remove the weird formatting anyways because it would eliminate a dependency and right now it just looks nice and nothing else. i'll ping you when i have a working build of that so you can try it out for me!

@barkdoll
Copy link

Windows 10 x64 => also having the same issue with the output

I will give you any information to assist with the fix just let me know what you need.


       welcome to...
                 _   _ _
  _ __ _   _ ___| |_| (_)_ __   __ _ ___
 | '__| | | / __| __| | | '_ \ / _` / __|
 | |  | |_| \__ \ |_| | | | | | (_| \__ \
 |_|   \__,_|___/\__|_|_|_| |_|\__, |___/
                               |___/

?[48;2;45;45;45m?[38;2;211;208;200mThanks for installing ?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;153;204;153mrustlings?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;211;208;200m!

?[48;2;45;45;45m?[38;2;102;153;204m##?[48;2;45;45;45m?[38;2;211;208;200m ?[48;2;45;45;45m?[38;2;102;153;204mIs this your first time?

?[48;2;45;45;45m?[38;2;211;208;200mLet's make sure you're up to speed:
?[48;2;45;45;45m?[38;2;242;119;122m-?[48;2;45;45;45m?[38;2;242;119;122m ?[48;2;45;45;45m?[38;2;242;119;122mYou have Rust installed, preferably via ?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;153;204;153mrustup?[48;2;45;45;45m?[38;2;153;204;153m`
?[48;2;45;45;45m?[38;2;242;119;122m-?[48;2;45;45;45m?[38;2;242;119;122m You have ?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;153;204;153m~/.cargo/bin?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;242;119;122m added to your PATH variable
?[48;2;45;45;45m?[38;2;242;119;122m-?[48;2;45;45;45m?[38;2;242;119;122m You have cloned this repository (?[48;2;45;45;45m?[38;2;242;119;122mhttps://github.com?[48;2;45;45;45m?[38;2;242;119;122m/rust-lang/rustlings?[48;2;45;45;45m?[38;2;242;119;122m)
?[48;2;45;45;45m?[38;2;242;119;122m-?[48;2;45;45;45m?[38;2;242;119;122m You have installed Rust language support for your editor
?[48;2;45;45;45m?[38;2;242;119;122m-?[48;2;45;45;45m?[38;2;242;119;122m You have locally installed the ?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;153;204;153mrustlings?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;242;119;122m command by running:

?[48;2;45;45;45m?[38;2;211;208;200m```?[48;2;45;45;45m?[38;2;249;145;87msh
?[48;2;45;45;45m?[38;2;211;208;200mcargo install --path .
?[48;2;45;45;45m?[38;2;211;208;200m```

?[48;2;45;45;45m?[38;2;211;208;200mIf you've done all of this (or even most of it), congrats! You're ready
?[48;2;45;45;45m?[38;2;211;208;200mto start working with Rust.

?[48;2;45;45;45m?[38;2;211;208;200mTo get started, run ?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;153;204;153mrustlings verify?[48;2;45;45;45m?[38;2;153;204;153m`?[48;2;45;45;45m?[38;2;211;208;200m in order to get the first exercise.
?[48;2;45;45;45m?[38;2;211;208;200mMake sure to have your editor open!
?[0m

@andersarpi
Copy link

andersarpi commented May 15, 2019

I get the same issue with rustlings 1.2.2 on Windows 10 (version 1803 for x64). Tried in both cmd and PowerShell, with the same result.

Edit: For anyone coming here with the same issue, a workaround for doing the rustlings exercises without strange output is to just use Windows Subsystem for Linux. Just make sure to install rust there as well (the regular Windows installation doesn't work). Also make sure you have gcc installed.

bors added a commit that referenced this issue Jun 5, 2019
Remove highlighting and syntect

Closes #166 and #122
@komaeda
Copy link
Contributor

komaeda commented Jun 5, 2019

This should be fixed by #167!

@komaeda komaeda closed this as completed Jun 5, 2019
pedantic79 pushed a commit to pedantic79/rustlings that referenced this issue Apr 11, 2020
ppp3 pushed a commit to ppp3/rustlings that referenced this issue May 23, 2022
dmoore04 pushed a commit to dmoore04/rustlings that referenced this issue Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-source Area: CLI source C-bug Category: Bug
Projects
None yet
Development

No branches or pull requests

4 participants