Skip to content

Instantly share code, notes, and snippets.

@amitu
Created January 25, 2013 10:13
Show Gist options
  • Save amitu/4633274 to your computer and use it in GitHub Desktop.
Save amitu/4633274 to your computer and use it in GitHub Desktop.
zsh preexec hook example
# less -F: Causes less to automatically exit if the entire file can be displayed on the first screen.
# .zshrc
function printc () {
print "printc" $1
}
autoload -Uz add-zsh-hook
add-zsh-hook preexec printc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment