Skip to content

Commit

Permalink
Fix missing add-zsh-hook
Browse files Browse the repository at this point in the history
In older version of zsh, `add-zsh-hook` is not available, causing issues like:

```
/Users/hugo/.oh-my-zsh/lib/termsupport.zsh:32: add-zsh-hook: function definition file not found
/Users/hugo/.oh-my-zsh/lib/termsupport.zsh:33: add-zsh-hook: function definition file not found
```

See ohmyzsh#748. This patch pulls in the changes suggested in ohmyzsh#748 (comment) by @mcornella and I have tested it on RHEL 5.
  • Loading branch information
owenthereal authored and noj committed Nov 4, 2014
1 parent 80d1c92 commit d185e38
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/termsupport.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ function omz_termsupport_preexec {
title '$CMD' '%100>...>$LINE%<<'
}

autoload -U add-zsh-hook
add-zsh-hook precmd omz_termsupport_precmd
add-zsh-hook preexec omz_termsupport_preexec
precmd_functions+=(omz_termsupport_precmd)
preexec_functions+=(omz_termsupport_preexec)

0 comments on commit d185e38

Please sign in to comment.