diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2015-05-16 01:34:20 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2015-05-16 01:34:20 +0800 |
commit | df87da6dd52a3169a6f3f44aac4be81db439d7fa (patch) | |
tree | be9379c1e22a09bbc7d9870983f9bdf780a81f89 | |
parent | 98ceec9bad76e268ca8e04a499749ed632a215b5 (diff) | |
download | configfile-df87da6dd52a3169a6f3f44aac4be81db439d7fa.tar.gz configfile-df87da6dd52a3169a6f3f44aac4be81db439d7fa.tar.zst configfile-df87da6dd52a3169a6f3f44aac4be81db439d7fa.zip |
bash_include: OpenBSD 的 serial console 是 tty0*,而在 Linux 不可能出現 tty0
-rw-r--r-- | bash_include | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bash_include b/bash_include index 567af17..36c42fc 100644 --- a/bash_include +++ b/bash_include @@ -14,7 +14,7 @@ if [[ "$-" == *i* ]] ; then interactive_shell=1; fi [ "$interactive_shell" ] && echo "Running .bash_include" [ "$interactive_shell" ] && default_tty_setting="`stty -g`" [ "$interactive_shell" ] && TTY="`tty`" && \ - if [[ "$TTY" =~ "/dev/tty"[0-9]+ ]]; then + if [[ "$TTY" =~ "/dev/tty"[1-9]+ ]]; then tty_short="#v${TTY:8}" elif [[ "$TTY" == "/dev/tty"* ]]; then tty_short="#${TTY:8}" |