Imagine I am typing at my terminal prompt, but actually decide not to type anything. Instead I just press enter.
Is there a way I can make zsh run a command now?
I want to potentially make this command variable, e.g. repeat the last command, or if the last command was z
then pressing enter on the blank prompt should run echo $PWD
.
How can I do this?
z
". I, myself, struck out on theTRAPDEBUG()
route -- an empty command seems not to trigger it.z
it takes me to a directory, and then pressing enter (on the now blank command line, re-drawn prompt) it should run my specifiedecho $PWD