all repos — nixfiles @ 10731104d210e82a20d337eeebc636d9fe59456f

System and user configuration, managed by nix and home-manager

user/zsh/zshrc.darwin (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- mode: sh; -*-
set_title() {
	print -Pn "\e]0;$1\7\n"
}
ssh() {
	local arg server retval
	for arg; do
		if [[ "${arg#-}" == "$arg" ]]; then
			server=$arg
			break
		fi
	done
	set_title "file://${server}/"
	command ssh "$@"
	retval=$?
	set_title
	return $retval
}
mosh() {
	command mosh "$@"
	retval=$?
	set_title
	return $retval
}