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

LS command causes to change the color of the output back to default #5243

Open
2 tasks done
d1m4s1k opened this issue Oct 12, 2024 · 2 comments
Open
2 tasks done

LS command causes to change the color of the output back to default #5243

d1m4s1k opened this issue Oct 12, 2024 · 2 comments
Labels

Comments

@d1m4s1k
Copy link

d1m4s1k commented Oct 12, 2024

Describe the bug

I want to change the color of the screen text and after that list the files in the current directory but it happens to reset the color back to white which is default. I suppose it occurs because of the using the ls command that highlights some files with colors.
image

Steps to reproduce the behaviour

  1. Type "color 0a"
  2. Type "ls"

Expected behavior

The color of the text had not changed

What operating system(s) this bug have occurred on?

Windows 10 HSL

What version(s) of DOSBox-X have this bug?

V2024.10.01, Visual Studio SDL1 64-bit

Used configuration

No response

Output log

No response

Additional information

No response

Have you checked that no similar bug report(s) exist?

  • I have searched and didn't find any similar bug report.

Code of Conduct & Contributing Guidelines

  • I agree to follow the code of conduct and the contributing guidelines.
@d1m4s1k d1m4s1k added the bug label Oct 12, 2024
@joncampbell123
Copy link
Owner

joncampbell123 commented Oct 14, 2024

I don't know about this. ANSI codes don't provide a way to read back state to restore it later.
On my Linux system, ls --color will reset any attributes I set on the terminal prior to it.
It makes logical sense that "ls" would have the same limitation: Resets the attribute to normal white on exit.

Unless standard DOS somehow allows "ls" to restore the attribute exactly as it was, it would be better for your program/script to re-apply the ANSI attributes it needs after running "ls".

@joncampbell123
Copy link
Owner

What I mean is, if MS-DOS ANSI.SYS provides no way to save/restore attributes in that way, then neither should DOSBox-X.

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