Created
March 11, 2015 20:36
-
-
Save andrewyates/f988fa8c69ce8503d2b0 to your computer and use it in GitHub Desktop.
set the screen window title to the currently running (or last run) command
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
# set the screen window title to the currently running (or last run) command | |
preexec () { | |
local CMD=${1[(wr)^(*=*|sudo|-*)]} | |
print -Pn "\ek$CMD $a\e\\" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment