-
Notifications
You must be signed in to change notification settings - Fork 102
docs: add truecolor info #273
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Wish Docs | ||
|
|
||
| Welcome to the Wish official documentation. If you're new to the project, make | ||
| sure you check out the [README][README] for a high-level overview of the | ||
| project and how to get started. From there, take a look at the | ||
| [examples][examples]. They're ordered by complexity and will show you how to | ||
| use Wish. If you're looking for additional functionality not shown in the | ||
| examples, I'd highly recommend checking out the [godoc at | ||
| pkg.go.dev][pkg.go.dev]. The godoc showcases all of the functionality available | ||
| to you with Wish with descriptions on what those functions do. | ||
|
|
||
| If you want *more* examples from projects of various sizes, | ||
| [sourcegraph][sourcegraph] is a great code search tool that can help you find | ||
| other projects that use Wish. A great way to leverage this tool is when looking | ||
| at our API (in the godoc), do a global search for that specific function. e.g. | ||
| `wish.NewServer`. If you have questions about the limitations of Wish, we're | ||
| happy to help, though given we're a small team of maintainers, it may take some | ||
| time. In the meantime, you may find that [phorm.ai][phorm] is helpful in | ||
| answering your questions about Charm projects. We've found it to be quite | ||
| helpful so far. | ||
|
|
||
| This directory includes additional information about how Wish works. The topics | ||
| chosen for this section are based on frequently asked questions in the | ||
| community. If there's a topic you'd like to see covered in this section, please | ||
| submit an [issue][issue] with links to or quotes of questions on that topic. | ||
| That will allow us to ensure we're answering the question effectively. | ||
|
|
||
| [README]: https://github.com/charmbracelet/wish?tab=readme-ov-file#wish | ||
| [examples]: https://github.com/charmbracelet/wish/tree/main/examples#wish-examples | ||
| [pkg.go.dev]:https://pkg.go.dev/github.com/charmbracelet/wish | ||
| [issue]: https://github.com/charmbracelet/wish/issues/new/choose | ||
| [phorm]: https://www.phorm.ai | ||
| [sourcegraph]: https://sourcegraph.com/search?q=context:global+wish.NewServer&patternType=keyword&sm=0 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,176 @@ | ||||||
|
|
||||||
| # Truecolor Over SSH With Wish | ||||||
|
|
||||||
| ## Color profiles? What, like it's hard? | ||||||
|
|
||||||
| In an SSH session, the client only sends the `TERM` environment variable, which | ||||||
| can only detect `256 color` support. If you run `echo $COLORTERM` in your shell | ||||||
| you'll likely see `truecolor` as the result, which is what you want for ultra | ||||||
| colorful terminal outputs. If you don't see that as a result, it might be time | ||||||
| to try a new [terminal emulator][supported-emulators]. | ||||||
|
|
||||||
| Unfortunately, there is no standard way for terminals to detect `truecolor` | ||||||
| support in an SSH session, hence why it defaults to `256 color`. Most terminals | ||||||
| express their `truecolor` support with the `COLORTERM` environment variable, | ||||||
| but this doesn't get sent when connecting over SSH. One workaround is to make | ||||||
| SSH send this environment variable using `SendEnv COLORTERM` in the [`ssh | ||||||
| config`][truecolor-ssh]. By default, the OpenSSH client (what you're using when | ||||||
| you run `ssh`) will only send the `TERM` to the remote, so other variables must | ||||||
| be configured. In the future, we hope to solve this problem by querying the | ||||||
| terminal for support if `COLORTERM` is not detected. | ||||||
|
|
||||||
| > [!NOTE] | ||||||
| > Wish uses [termenv][termenv] under the hood, which will set truecolor for a few | ||||||
|
||||||
| > Wish uses [termenv][termenv] under the hood, which will set truecolor for a few | |
| > Wish uses [termenv][termenv] under the hood, which will set `truecolor` for a few |
Outdated
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.
| NO_COLOR vs CLICOLOR: if NO_COLOR is set or CLICOLOR=0 then the output should | |
| `NO_COLOR` vs `CLICOLOR`: if `NO_COLOR `is set or `CLICOLOR=0` then the output should |
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.
oh HA, I can add this back in. I thought I had accidentally added this