You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add %SYMBOL% substituting to non-clone time ices like atload'', etc.
There are many such symbol var-like symbols:
- %ID% β id-as ice
- %USER% β username (in user/plugin ID)
- %PLUGIN% β plugin name (in user/plugin ID)
- %URL% β snippet url
- %DIR% β plugin directory path
- %ZPFX% β value of $ZPFX
- %OS% β `$OSTYPE`
- %MACH% β `$MACHTYPE`
- %CPU% β `$CPUTYPE`
- %VENDOR% β `$VENDOR`
- %HOST% β `$HOST`
- %UID% β `$UID` (numerical user id)
- %GID% βΒ `$GID` (group #)
With this patch many has been fixed (like %ID%, %USER%, %PLUGIN% were
returning empty strings, possibly breaking packages, where this undocumented
feature is used) and support for load-time ices (like `atload''`, etc.) have
been added.
For example:
```zsh
zinit id-as'plugin-%UID%' atload'print Loaded from dir: %DIR%, plugin id: %ID%' for zdharma-continuum/null
```
output is:
```
Loaded from dir: /home/q/.local/share/zinit/plugins/plugin-500, plugin id: plugin-500
```
You can use a set of special var-like strings in any of the ices (currently: `atinit`, `atload`, `atclone`, `atpull`, `mv`, `cp`, `make`, `configure`, and a few others):
0 commit comments