From 186210dfd20f4c2dc97cd7ab0b12e5de2efd7ccf Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Thu, 23 Apr 2020 17:00:10 -0400 Subject: [PATCH] Updated Environment Variables (markdown) --- Environment-Variables.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Environment-Variables.md b/Environment-Variables.md index 0d90356..5d1527d 100644 --- a/Environment-Variables.md +++ b/Environment-Variables.md @@ -1,10 +1,10 @@ -A [new feature](https://github.com/shazow/ssh-chat/pull/333) of `ssh-chat` is the ability to define locally what settings you would like to have in your `ssh-chat` session before connecting. The `ssh-chat` server will interpret your local variables and change settings to match yours accordingly (if they can be matched). Variables have to sent with the `SendEnv` flag accordingly. +A [new feature](https://github.com/shazow/ssh-chat/pull/333) of `ssh-chat` is the ability to define locally what settings you would like to have in your `ssh-chat` session before connecting. The `ssh-chat` server will interpret your local variables and change settings to match yours accordingly (if they can be matched). Variables have to sent with the `SendEnv` flag accordingly, or the `SetEnv` flag. ## `SSHCHAT_THEME` The simplest variable is the `SSHCHAT_THEME` variable which allows you to define what theme you would like for your session. This can be defined to match any theme defined within `ssh-chat`, so for example to connect using the `solarized` theme, which is normally activated by running `/theme solarized`, you can instead do the following: ```bash -$ ssh -o SetEnv SSHCHAT_THEME=solarized username@ssh.chat +$ ssh -o SetEnv "SSHCHAT_THEME=solarized" username@ssh.chat ``` Upon joining, your session's theme will automatically be `solarized`. This works for all themes (`mono`, `colors`, `hacker`, `solarized`, etc). @@ -13,7 +13,7 @@ Upon joining, your session's theme will automatically be `solarized`. This works `ssh-chat` supports the ability to log messages with a datetime stamp next to each received message. This behavior is enabled by running a `/timestamp` command within the chat. It can be turned on before connecting by doing the following: ```bash -$ ssh -o SetEnv SSHCHAT_TIMESTAMP=1 username@ssh.chat +$ ssh -o SetEnv "SSHCHAT_TIMESTAMP=1" username@ssh.chat ``` It also supports the ability to pre-load a datetime format as well. @@ -23,7 +23,10 @@ It also supports the ability to pre-load a datetime format as well. The `TERM` variable is meant to enable specific modes of `ssh-chat` which changes how messages are displayed when received. Currently, only a `bot` mode is supported [right now](https://github.com/shazow/ssh-chat/pull/341), which makes it easier for programs to be created to read messages from `ssh-chat` without having to interpret ANSI codes. To turn on a specific mode, you can run the following: + ```bash -$ ssh -o SetEnv TERM=bot username@ssh.chat +$ TERM=bot ssh.chat +# Or if you're not requesting a pty, +$ ssh -o SetEnv TERM=bot ssh.chat ```