Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

special color for user input in REPL #64

Open
jeisner opened this issue Jul 25, 2013 · 5 comments
Open

special color for user input in REPL #64

jeisner opened this issue Jul 25, 2013 · 5 comments

Comments

@jeisner
Copy link
Collaborator

jeisner commented Jul 25, 2013

Could user input be shown at the REPL in a special color? Or perhaps in bold?
It's nice to distinguish input from output when scrolling. And it would also be helpful to distinguish them in doctests and when showing REPL traces in the tutorial or manual.

(If user input needs to be in the default color, I imagine everything else could be in a special color ...)

@timvieira
Copy link
Collaborator

How about a compromise: only the > will be a special color. This is what other REPLs seem to do (e.g. IPython, bash terminals are often configures to have colorful PS1).

@jeisner
Copy link
Collaborator Author

jeisner commented Jul 25, 2013

Compromise because what I suggested is hard?
The compromise is better than what we have now, but the version I suggested seems nicer if we could get it.
Especially better for distinguishing input from output in the manual, and for clarifying where there's multi-line input.

@timvieira
Copy link
Collaborator

Compromise because what I suggested is hard?

Yup. It's pretty tricky to get colors in the terminal to be well-behaved. For example, If you ^C in the middle of an ANSI control code, it will break your terminal (e.g. you wont be able to see what your typing). Limiting the use of color is generally a good idea. This is why you don't tend to see very many colorful terminal applications (unless it's curses).

@timvieira
Copy link
Collaborator

Should probably xref:#11

@jeisner
Copy link
Collaborator Author

jeisner commented Jul 26, 2013

Seems like the ^C problem would bite us for using any amount of color: limiting the amount doesn't really fix it, does it? But to fix it, isn't there a reset-terminal ANSI code that we could emit after ^C?

How about the idea of having user input in the default color, but all output in other colors? Does that help? The output is pretty darn colorful already ...

timvieira added a commit that referenced this issue Jul 27, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants