dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 5c080109610896c3dabd9c1e7ded8ce30cade787
parent e4b4878ca0ed765d37c0aaf1250964719a8a99e2
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Tue, 15 May 2018 20:16:51 -0400

Readjust zsh pre_cmd

Diffstat:
M.zshrc | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/.zshrc b/.zshrc @@ -34,12 +34,9 @@ RPS1="[%?]" PS1="%{$usercolor%}%n%{$reset%}@%{$fg[green]%}%m:%{$reset%}%c%{$fg[red]%}\$(__git_ps1 \" (%s)\")%{$reset%}%(!.#.\$) " unset usercolor reset -preexec() -{ - base=`echo $2|cut -d ' ' -f 1` - print -Pn "\033]0;%n@%m:`basename $base`\007" -} -precmd() { print -Pn "\033]0;%n@%m:%~\007" } +set_title() { print -Pn "\033]0;%n@%m:$1\007" } +preexec() { set_title "$2" } +precmd() { set_title "%~" } [ -d /usr/share/zsh/site-functions/ ] && fpath=(/usr/share/zsh/site-functions/ $fpath) [ -d "$HOME/.zsh/functions" ] && fpath=("$HOME/.zsh/functions" $fpath)