Created
March 8, 2014 22:06
-
-
Save acook/9439618 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update window title with command | |
function preexec { | |
commandline="$1" # the user-entered commandline is passed in as first arg | |
args=${${(z)commandline}[2,-1]} # get command's args | |
new_title=${args:-$PWD} # if no args, then use the pwd | |
set_window_title $new_title | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment