blob: 06e7bbc9b2e1f90c6a248aa7015e503ac9e7fb7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# -*- 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
if [[ ! -p /dev/fd/1 ]]; then
set_title "ssh $server"
command ssh "$@"
retval=$?
set_title
return $retval
else
command ssh "$@"
return $retval
fi
}
mosh() {
set_title "mosh $@"
command mosh "$@"
retval=$?
set_title
return $retval
}
finder() {
open -a Finder "${1:-.}"
}
compdef '_path_files -/' finder
if test -n "$KITTY_INSTALLATION_DIR"; then
export KITTY_SHELL_INTEGRATION="enabled"
autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
kitty-integration
unfunction kitty-integration
alias ssh="kitten ssh"
fi
|