diff --git a/pure.zsh b/pure.zsh index d04a751..f74f09e 100644 --- a/pure.zsh +++ b/pure.zsh @@ -55,12 +55,21 @@ pure_preexec() { cmd_timestamp=`date +%s` + + # shows the current dir and executed command in the title when a process is active + print -Pn "\e]0;$PWD:t: $2\a" } pure_precmd() { + # shows the full path in the title + print -Pn '\e]0;%~\a' + + # git info vcs_info + # add `%*` to display the time print -P '\n%F{blue}%~%F{8}$vcs_info_msg_0_`pure_git_dirty` $username%f %F{yellow}`pure_cmd_exec_time`%f' + # reset value since `preexec` isn't always triggered unset cmd_timestamp } diff --git a/readme.md b/readme.md index efabb1e..cd380b5 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ > Pretty, minimal and fast ZSH prompt -![screenshot](https://raw.github.com/sindresorhus/pure/master/screenshot.png) +![screenshot](screenshot.png) ## Overview @@ -16,6 +16,7 @@ Most prompts are cluttered, ugly and slow. I wanted something visually pleasing - Prompt character turns red if the last command didn't exit with 0. - Command execution time will be displayed if it exceeds the set threshold. - Username and host is only displayed when in an SSH session. +- Shows the current path in the title and the current directory and command when a process is running. - Can easily be used as a starting point for your own custom prompt. diff --git a/screenshot.png b/screenshot.png index 01bcd9d..a2b7417 100644 Binary files a/screenshot.png and b/screenshot.png differ