Discussion:
[os-rfe] Colors in shell prompt, emacs,vi...
Stacey Marshall
2009-06-11 16:06:22 UTC
Permalink
Could it be possible to add colors in the shell for the next release?
I would like to have colors in my shell prompt, in emacs, in vi,
gnome-terminal and xterm have supported color for some time.
By default though they set TERM to xterm and thus applications don't use it.
Set TERM to xterm-color and applications like vi and emacs should then do syntax highlighting in color.

For your command prompt set a suitable PS1, for example

$ echo $PS1 | cat -vet
^[[36;1Yep^[[m$$

And for ls, use '/usr/gnu/bin/ls --color=auto'.
and svcs would be also nice with
colors.
online should be green
offline and maintenance should be red
An interesting idea.
--
Richard L. Hamilton
2009-06-15 13:32:30 UTC
Permalink
[...]
Post by Stacey Marshall
and svcs would be also nice with
colors.
online should be green
offline and maintenance should be red
An interesting idea.
First, not everyone _wants_ color! Most of the time, I use lower-contrast
windows (grey background, black text), and color looks horrible on them. On my
Mac, I usually use translucent black background and white text, on which color is also
not good. Color only works well with default black text on a white or almost white
background.

However, I think it works better for a one-item-per-line display than for something
like ls -C; to me, a multi-column display of relatively short items looks very cluttered
in color.

Second, as a _non_default (unless maybe one set an environment variable or an
alias with a command line option) behavior, I'd rather see svcs have:

online: green

maintenance: red

degraded: yellow (could be either a problem of its own or with a dependency)

offline: magenta (since offline will usually go online after the service
in maintenance mode that it depends on is successfully cleared - it's seldom a
separate problem)

uninitialized: cyan (or blue), just because it would be unusual to actually see this

legacy_run, disabled: black (the former not actively managed by SMF, the latter being
intentional either by default or by explicit action, these are boring, and I want to
try not to use all of the 7 ANSI colors other than white in case we want another later
on)
--
Lubos Kocman
2009-06-16 07:44:03 UTC
Permalink
Damn guys,

why do you want to change these stuff?

1) not everybody likes
colorful stuff ... mainly from linux world (i think that guy who invented this idea with svcs came from there) ...

2) If you want to have color support in ls then use gnu
version with of ls --color (change path or create alias to it). The same with other stuff

Please do not try to mess traditional svr4 stuff with stuff / features
that you like on linux (rc-update ....) .....

I'll tell you a story.

Oneguy had a perfect and comfortable room called myroom. Then other guycame and took a can with green & cyan color, a hammer and almoststarted repainting and re-structuring of the room. First guyimmidiately stopped the second one and told him, that he can take thesecond room and left first room as it is. Because when everybody entersroom (even after some time) he well except still the same room and nota girder which will hit him into a head.

Hope you get it




--
Best regards

Lubos Kocman
UNIX IT Specialist 2nd level support, IBM

“Unix is user-friendly. It’s just very selective about who its friends are.”

- Hide quoted text -
On Mon, Jun 15, 2009 at 3:32 PM, Richard L.
Post by Richard L. Hamilton
[...]
Post by Stacey Marshall
and svcs would be also nice with
colors.
online should be green
offline and maintenance should be red
An interesting idea.
First, not everyone _wants_ color! Most of the time, I use lower-contrast
windows (grey background, black text), and color looks horrible on them. On my
Mac, I usually use translucent black background and white text, on which color is also
not good. Color only works well with default black text on a white or almost white
background.
However, I think it works better for a one-item-per-line display than for something
like ls -C; to me, a multi-column display of relatively short items looks very cluttered
in color.
Second, as a _non_default (unless maybe one set an environment variable or an
online: green
maintenance: red
degraded: yellow (could be either a problem of its own or with a dependency)
offline: magenta (since offline will usually go online after the service
in maintenance mode that it depends on is successfully cleared - it's seldom a
separate problem)
uninitialized: cyan (or blue), just because it would be unusual to actually see this
legacy_run, disabled: black (the former not actively managed by SMF, the latter being
intentional either by default or by explicit action, these are boring, and I want to
try not to use all of the 7 ANSI colors other than white in case we want another later
on)
--
This message posted from opensolaris.org
_______________________________________________
opensolaris-rfe mailing list
Loading...