summary refs log tree commit diff
path: root/kbfunc.c
diff options
context:
space:
mode:
authorokan <okan>2014-01-23 16:51:28 +0000
committerokan <okan>2014-01-23 16:51:28 +0000
commit79248a385ba53bc41c1a8200799b6250f7c922bb (patch)
treeefd0e7dd2cc03d78f1d5370f8b5b1fce212a42df /kbfunc.c
parent3d2eec293a2cf4a0a2b7082e26d68c2bd8589d65 (diff)
downloadcwm-79248a385ba53bc41c1a8200799b6250f7c922bb.tar.gz
cwm-79248a385ba53bc41c1a8200799b6250f7c922bb.tar.xz
cwm-79248a385ba53bc41c1a8200799b6250f7c922bb.zip
If no title is supplied, term uses only the basename for its title.
This is useless when searching for windows launched via the ssh command
menu; supply a more useful title: '[ssh] <hostname>'.

Idea from todd@, ok todd@
Diffstat (limited to 'kbfunc.c')
-rw-r--r--kbfunc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kbfunc.c b/kbfunc.c
index d15de7f..d44f63b 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -354,8 +354,8 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg)
 	    search_match_exec, NULL)) != NULL) {
 		if (mi->text[0] == '\0')
 			goto out;
-		l = snprintf(cmd, sizeof(cmd), "%s -e ssh %s", Conf.termpath,
-		    mi->text);
+		l = snprintf(cmd, sizeof(cmd), "%s -T '[ssh] %s' -e ssh %s",
+		    Conf.termpath, mi->text, mi->text);
 		if (l != -1 && l < sizeof(cmd))
 			u_spawn(cmd);
 	}