feat(username): Try harder to guess if inside ssh (#1964)

* feat: Try harder to guess if inside ssh

* Add test for SSH_CLIENT

* Update documentation on checking ssh connection

* Update docs/config/README.md

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
This commit is contained in:
yangsheng6810
2020-12-06 15:15:20 -06:00
committed by GitHub
parent 70dcd33aa2
commit a72977f7d4
2 changed files with 39 additions and 2 deletions
+6
View File
@@ -2399,6 +2399,12 @@ The module will be shown if any of the following conditions are met:
- The user is currently connected as an SSH session
- The variable `show_always` is set to true
::: tip
SSH connection is detected by checking environment variables
`SSH_CONNECTION`, `SSH_CLIENT`, and `SSH_TTY`. If your SSH host does not set up
these variables, one workaround is to set one of them with a dummy value.
:::
### Options
| Option | Default | Description |