diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-28 03:56:04 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-12-28 03:56:04 +0300 |
commit | 7873751256b71ae7bef86a89b8e2065f492d25db (patch) | |
tree | 98ea10ea9eafdf1d3267307c02e08788b3fdc2c8 /%HOME% | |
parent | .vimrc: access X clipboard (diff) | |
download | linux-home-7873751256b71ae7bef86a89b8e2065f492d25db.tar.gz linux-home-7873751256b71ae7bef86a89b8e2065f492d25db.zip |
.bashrc: better remote session detection
Weirdly, SSH_TTY & SSH_CLIENT are also defined for local sessions when
you:
* ssh to your box,
* start the X server there.
I don't know why, seems illogical.
Diffstat (limited to '')
-rw-r--r-- | %HOME%/.bashrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 57abd9b..0c9bc2e 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -137,7 +137,7 @@ nnn() { } remote_terminal() { - test -n "$SSH_CLIENT" -o -n "$SSH_TTY" + test -n "$SSH_CONNECTION" } local_terminal() { |