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

Option to change ▶ symbol #473

Closed
mqudsi opened this Issue Aug 26, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@mqudsi

mqudsi commented Aug 26, 2017

I'm using elvish under WSL (basically, shell-only Ubuntu) under Windows 10. The only problem that I've noticed thus far in compatibility with conhost (the Windows master terminal) is that the default symbol used as the indicator for structured output is not rendered.

I'm sure that conhost isn't the only terminal with issues rendering the ▶ symbol (or maybe the font used simply doesn't have a mapping for that codepoint), so an option to change the indicator to an ascii character like * or something would be handy.

If this is already possible, I humbly beg forgiveness and would appreciate a link to read the relevant documentation.

@xiaq xiaq closed this in ac8e943 Oct 1, 2017

@xiaq

This comment has been minimized.

Member

xiaq commented Oct 1, 2017

@krader1961

This comment has been minimized.

krader1961 commented Oct 1, 2017

It's nice that you allowed for an arbitrary string rather than a single character. This means you can include escape sequences to do things like change the color. You can't see it here but the hash-mark is rendered in green:

~/go/src/github.com/elves/elvish> value-out-indicator = "\e[32m#\e[m "
~/go/src/github.com/elves/elvish> put $value-out-indicator
# "\e[32m#\e[m "

I didn't see any obvious way to specify the style of the text in an abstract manner rather than hardcoding the escape sequences. Using le:styled as documented in issue #199 no longer works and there doesn't seem to be anything relevant in the docs.

Is the intent that people should use the external tput command? Would introducing a builtin analogous to fish's set_color command be accepted?

@xiaq

This comment has been minimized.

Member

xiaq commented Oct 1, 2017

The le: module is now known as edit:.

It is not ideal, but you can use echo to convert the output of edit:styled to a string: value-out-indicator = (echo (edit:styled '# ' green))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment