Skip to content

Commit b3de8d0

Browse files
author
Steven Joseph (asyncmind)
committed
fix: use short hostname for tmux window
1 parent 8993077 commit b3de8d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autossh.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def attach_tmux(args):
6060
["tmux", "display-message", "-p", "x'#W"], env=get_env()
6161
)
6262
subprocess.check_call(
63-
["tmux", "rename-window", args["hostname"]], env=get_env()
63+
["tmux", "rename-window", args["hostname"].split(".")[0]],
64+
env=get_env(),
6465
)
6566
cmd = []
6667
cmd.extend(
@@ -79,7 +80,6 @@ def attach_tmux(args):
7980
if args["port"]:
8081
cmd.extend(("-p", args["port"]))
8182
if args["binary"]:
82-
8383
cmd.append("exec tmuxpy -r {<server>} {<sessionname>}".format(**args))
8484
else:
8585
cmd.append(

0 commit comments

Comments
 (0)