-
Notifications
You must be signed in to change notification settings - Fork 99
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
Color output for commands #179
Comments
We can use an environment variable or a command line flag to control the colors (for example to work around tests or other cases where we need to redirect the output to a file) |
BTW I have this when I need to write the output of a command to a file when it's too long to read in the terminal (e.g. the result of
import lldb
import sys
def to_file(debugger, command, result, dict):
# Change the output file to a path/name of your choice
f = open("/tmp/temp-lldb-output.txt", "w")
debugger.SetOutputFileHandle(f, True)
# Change command to the command you want the output of
debugger.HandleCommand(command)
f.close()
print >> sys.stderr, 'Written to /tmp/temp-lldb-output.txt'
debugger.SetOutputFileHandle(sys.stdout, True)
|
Ohh, nice script! I usually do I was thinking: we could have something like Edit: This would also make it easier to have an environment variable and a flag, as you suggested 😄 |
@mmarchini SGTM |
If we do this (which I think we should) I think the standard thing I've seen is to set |
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179
I started working on a prototype, using the rang library. Any thoughts and ideas are welcome. The proposed flag is still missing, I just need some guidance to know if current work is ok. Current work: master...Drieger:start_colorization |
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179 Colorize findrefs output
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179 Colorize findrefs output
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179 Colorize findrefs output
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179 Colorize findrefs output
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179 Colorize findrefs output
To make visualization easier, objects types, properties and addresses will be colorized. Using `rang` library color pallete, the current definition is: * cyan for addresses * magenta for objects being inspected * yellow for types * bold yellow for objects properties Fixes: nodejs#179 Colorize findrefs output PR-URL: nodejs#225 Reviewed-By: Matheus Marchini <mat@mmarchini.me>
While trying to come up with a comprehensible output format for #115, I decided to play with colors in llnode commands outputs:
Not entirely sure if this is something we want to have on llnode since we'll need to detect if the terminal supports color (I have no idea how to do that), but if we decide to have it I can open a PR with it.
The text was updated successfully, but these errors were encountered: