summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zshrc17
1 files changed, 13 insertions, 4 deletions
diff --git a/.zshrc b/.zshrc
index 1e79c12..638210a 100644
--- a/.zshrc
+++ b/.zshrc
@@ -63,15 +63,24 @@ PROMPT='${vcs_info_msg_0_}
# Set terminal name to current running application
case $TERM in
- rxvt*)
- precmd () { print -Pn "\e]0;%~\a" }
- preexec () { print -Pn "\e]0;$1\a" }
- ;;
eterm-color*)
# Make {{ansi,multi}-,}term change Emacs' `default-directory'
# and keep track of the current user and host.
precmd () { print -P "\eAnSiTu %n\n\eAnSiTc %~" }
;;
+ rxvt*)
+ precmd () { print -Pn "\e]0;%~\a" }
+ preexec () { print -Pn "\e]0;$1\a" }
+ ;;
+ screen)
+ # Make screen show the current running command as window title
+ # or the shell if no command is running. The running command
+ # is presented as the first sequence of characters without a
+ # space on the given command line, possibly prefixed with
+ # `sudo '.
+ preexec () { print -Pn "\ek$(basename $1 | sed -e 's/^\(\(sudo \)\?[^ ]\+\).*/\1/')\e\\" }
+ precmd () { print -Pn "\ek$(basename $SHELL)\e\\" }
+ ;;
esac
export XDG_CACHE_HOME="$HOME/.cache"