Environment
- Zi
next at 3fa8433 (GitHub tarball), Zsh 5.9.2, Linux x86_64, zsh -f.
Minimal reproduction
A local plugin directory demo holding demo.plugin.zsh:
demo_fn() { :; }
bindkey "^X^D" demo_fn
Load it once in each of three fresh zsh -f shells, each sourcing zi.zsh, then print the plugin's state records from ZI:
zi light /path/to/demo # shell 1
zi light-mode for /path/to/demo # shell 2
zi load /path/to/demo # shell 3
for k in ${(k)ZI}; do
[[ $k == (STATES__*|FUNCTIONS_BEFORE__*|BINDKEYS__*) ]] && print -r -- "$k=${ZI[$k][1,40]}"
done
Actual behavior
| Command |
STATES__%.../demo |
FUNCTIONS_BEFORE__ |
BINDKEYS__ |
zi light /path/to/demo |
2 |
recorded |
^X^D demo_fn recorded |
zi light-mode for /path/to/demo |
1 |
empty |
empty |
zi load /path/to/demo |
2 |
recorded |
^X^D demo_fn recorded |
Classic zi light loads the plugin with full tracking, exactly like zi load. The classic-syntax branch in zi.zsh sets ICE[light-mode]= (line 3030 on next) and then runs ICE=() ZI_ICE=() (line 3035) after copying ICE into ZI_ICES, so the light flag does not reach the load.
Expected behavior
zi light loads without tracking, as README.md:75 ("light loads a plugin without tracking and reporting overhead") and docs/man/zi.1:562 ("Light plugin load, without reporting/tracking") say: the same records as zi light-mode for (STATES__ 1, no function or bindkey records). zi light -b should keep tracking bindkey calls only.
Found while reviewing the unload work for #113 and #582; it is not part of those issues.
Environment
nextat3fa8433(GitHub tarball), Zsh 5.9.2, Linux x86_64,zsh -f.Minimal reproduction
A local plugin directory
demoholdingdemo.plugin.zsh:Load it once in each of three fresh
zsh -fshells, each sourcingzi.zsh, then print the plugin's state records fromZI:Actual behavior
STATES__%.../demoFUNCTIONS_BEFORE__BINDKEYS__zi light /path/to/demo2^X^D demo_fnrecordedzi light-mode for /path/to/demo1zi load /path/to/demo2^X^D demo_fnrecordedClassic
zi lightloads the plugin with full tracking, exactly likezi load. The classic-syntax branch inzi.zshsetsICE[light-mode]=(line 3030 onnext) and then runsICE=() ZI_ICE=()(line 3035) after copyingICEintoZI_ICES, so the light flag does not reach the load.Expected behavior
zi lightloads without tracking, asREADME.md:75("lightloads a plugin without tracking and reporting overhead") anddocs/man/zi.1:562("Light plugin load, without reporting/tracking") say: the same records aszi light-mode for(STATES__1, no function or bindkey records).zi light -bshould keep trackingbindkeycalls only.Found while reviewing the unload work for #113 and #582; it is not part of those issues.