summary refs log tree commit diff stats
path: root/user/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'user/zsh')
-rw-r--r--user/zsh/zshrc.darwin26
1 files changed, 26 insertions, 0 deletions
diff --git a/user/zsh/zshrc.darwin b/user/zsh/zshrc.darwin
new file mode 100644
index 00000000..1b702022
--- /dev/null
+++ b/user/zsh/zshrc.darwin
@@ -0,0 +1,26 @@
+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
+}
+