-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
more verbose multi-line display(c) for Char #19847
Conversation
function show(io::IO, ::MIME"text/plain", c::Char) | ||
show(io, c) | ||
u = UInt32(c) | ||
print(io, ": ", isascii(c) ? "ASCII/" : "", "Unicode U+", hex(u, u > 0xffff ? 8 : 4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use 6 instead of 8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
What is |
@quinnj, both the two-letter abbreviations and the expanded names for the Unicode character categories are standard, so it seemed useful to give them both. |
Would the Unicode description, like
be possible/desirable to add? |
@TotalVerb, not without storing the Unicode character-name database somewhere; it's about a MB uncompressed IIRC (see also #19725 and related issues), so I'm not sure this is a great thing for us to do. |
One option that occurred to me is to have a |
It also occurred to me to output the tab-completion info, which @ScottPJones also suggested on the mailing list, but this seemed too REPL-specific. It seemed better to just have this in the REPL help, e.g. if you type Update: see #19858. |
I'm not understanding the Travis failures here... oh, it was #19848. |
Should be good to merge; the i686 travis failure seems to be an endemic unrelated problem at the moment. |
I like it. Should we make sure that |
I added a test for |
Should be good to squash/merge; the Travis failure is the unrelated x86 problem we are having nowadays. |
show('$')
prints a terse representation like'$'
. I've been thinking it would be nice to have a more informative display in the REPL (and in other things like IJulia that use the 3-argumentshow
viadisplay
). This PR does so, giving output like: