Skip to content

Instantly share code, notes, and snippets.

@aehlke
aehlke / gist:992798
Created May 26, 2011 08:53 — forked from jamesmacaulay/gist:860763
zsh hooks to growl completion of long-running commands
# long-running command growler
# hooks for zsh, built on bash version at http://hints.macworld.com/article.php?story=20071009124425468
preexec_functions+='save_preexec_time'
save_preexec_time() {
export PREEXEC_CMD="$(history $HISTCMD | sed 's/ *[0-9]* *//')"
export PREEXEC_TIME=$(date +'%s')
}
precmd_functions+='growl_about_long_running_commands'