Zsh¶
ff hook zsh installs a git alias and quiet prompt snapshots in $ZDOTDIR/.zshrc, or ~/.zshrc when ZDOTDIR is unset. The alias runs ff git; the prompt runs ff trigger shell. See the shared capture and ownership rules.
Install¶
ff hook zsh
Activate¶
Open a new Zsh shell, or load its configuration:
source "${ZDOTDIR-$HOME}/.zshrc"
Verify¶
type git
print -l $precmd_functions
ff hook -l
The alias should run ff git, and the function list should contain _fufu_ambient. The list command checks installed files. To test prompt capture, edit a disposable file, return to the prompt, then inspect ff history for the shell capture.
Files changed¶
$ ff hook zsh
zsh wired into ~/.zshrc
restart the shell (or source the file) to activate it
$ cat ~/.zshrc
alias git='ff git' # fufu — added by `ff hook`
_fufu_ambient() { ff trigger shell } # fufu — added by `ff hook`
precmd_functions+=(_fufu_ambient) # fufu — added by `ff hook`
The file is created if missing. The marker identifies managed lines; recognized hand-written alias and prompt lines survive as described in the overview.
Remove¶
ff unhook zsh removes the marked lines. Restart Zsh afterward to unload the alias and prompt function.
$ ff unhook zsh
zsh removed the alias and the prompt hook from ~/.zshrc
$ cat ~/.zshrc
A hand-written alias or prompt hook is reported and stays.
Troubleshooting and migration¶
precmd_functions+= adds fufu's function without replacing other prompt callbacks. A framework that also appends works in either order; one that replaces the entire list can remove the hook. Repeated sourcing appends the function again, so use a new shell when checking a clean configuration.
Older markers (ff hook shell install, ff shell install) and ff hook shell trigger are upgraded by ff hook zsh. ff doctor reports these as stale until repaired.