aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/zsh/setopt.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/setopt.zsh')
-rw-r--r--zsh/setopt.zsh11
1 files changed, 10 insertions, 1 deletions
diff --git a/zsh/setopt.zsh b/zsh/setopt.zsh
index 8c173e5..7fffab6 100644
--- a/zsh/setopt.zsh
+++ b/zsh/setopt.zsh
@@ -7,4 +7,13 @@ DISABLE_UPDATE_PROMPT="true"
DISABLE_AUTO_TITLE="true"
setopt HIST_IGNORE_ALL_DUPS
setopt NO_BEEP
-setopt MENU_COMPLETE \ No newline at end of file
+setopt MENU_COMPLETE
+
+function set_title() {
+ folder=$(sed "s/$USER/~/g" <<<$PWD:t)
+
+ window_title="\033]0;$USER@$HOST: $folder\007"
+ echo -ne "$window_title"
+}
+
+autoload -Uz add-zsh-hook && add-zsh-hook precmd set_title \ No newline at end of file