Skip to content

Commit

Permalink
Work around $0 bug in Zsh 5.8
Browse files Browse the repository at this point in the history
Fixes #594.
  • Loading branch information
marlonrichert committed Jun 7, 2023
1 parent 784efee commit c8b93ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Functions/Init/.autocomplete:__main__
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ done

add-zsh-hook precmd ${0}:precmd
${0}:precmd() {
# WORKAROUND: For hook functions in Zsh 5.8, $0 can be something else than the function name.
0=${(%):-%N}

add-zsh-hook -d precmd $0
unfunction $0

Expand Down

0 comments on commit c8b93ad

Please sign in to comment.