Force UTF-8 when attaching in select-session.py

Call `tmux attach` with `-u` flag, which forces UTF-8.

This is default in the main script `/usr/bin/byobu`, but not `select-session.py`, which will cause issues when connecting via ssh. For example, `ssh $SERVER byobu` will show unicode characters as underscores.
This commit is contained in:
bryango 2019-09-05 22:37:23 +08:00 committed by GitHub
commit d3f40f1d22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,7 +132,7 @@ def attach_session(session):
cull_zombies(session_name) cull_zombies(session_name)
# must use the binary, not the wrapper! # must use the binary, not the wrapper!
if backend == "tmux": if backend == "tmux":
os.execvp("tmux", ["tmux", "attach", "-t", session_name]) os.execvp("tmux", ["tmux", "-u", "attach", "-t", session_name])
else: else:
os.execvp("screen", ["screen", "-AOxRR", session_name]) os.execvp("screen", ["screen", "-AOxRR", session_name])