Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agkozak/zhooks
Display Zsh hook functions and arrays
https://github.com/agkozak/zhooks
hooks zsh zsh-configuration zsh-plugin
Last synced: 5 days ago
JSON representation
Display Zsh hook functions and arrays
- Host: GitHub
- URL: https://github.com/agkozak/zhooks
- Owner: agkozak
- License: mit
- Created: 2018-05-18T19:18:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-26T18:00:29.000Z (11 months ago)
- Last Synced: 2024-08-02T16:05:49.351Z (3 months ago)
- Topics: hooks, zsh, zsh-configuration, zsh-plugin
- Language: Shell
- Homepage:
- Size: 1.59 MB
- Stars: 50
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zhooks
[![MIT License](img/mit_license.svg)](https://opensource.org/licenses/MIT)
![GitHub Stars](https://img.shields.io/github/stars/agkozak/zhooks.svg)`zhooks` is a tool for displaying the code for all Zsh hook functions (such as `precmd`), as well as the contents of hook arrays (such as `precmd_functions`). It is useful in debugging conflicts between interactive scripts.
![zhooks](img/demo.gif)
## Installation:
Simply source `zhooks` from your `.zshrc`:
source /path/to/zhooks.plugin.zsh
or load it using your favorite Zsh plugin manager or framework. Then run the command `zhooks` from the command line to see a thorough report.
`zhooks` returns true when hooks are being used and false when they are not.
## Zsh Hooks Functions and Hook Arrays
Zsh has the hook functions:
* `chpwd`
* `periodic`
* `precmd`
* `preexec`
* `zshaddhistory`
* `zsh_directory_name`
* `zshexit`The corresponding arrays have `_functions` appended to their names:
* `chpwd_functions`
* `periodic_functions`
* `precmd_functions`
* `preexec_functions`
* `zshaddhistory_functions`
* `zsh_directory_name_functions`
* `zshexit_functions`