Skip to content

modules/zsh: add zinit support#129

Draft
Mrid22 wants to merge 7 commits intoLassulus:mainfrom
Mrid22:zsh-zinit
Draft

modules/zsh: add zinit support#129
Mrid22 wants to merge 7 commits intoLassulus:mainfrom
Mrid22:zsh-zinit

Conversation

@Mrid22
Copy link

@Mrid22 Mrid22 commented Feb 21, 2026

Add zinit pm options with all pretzo and omz namespaces. NOTE: i am going to draft this for now because I have no clue how to make sure the plugins get removed once they are taken out of the array ( There's a command zinit delete for that, but idk how to run that automatically ), there is also no home-manager or nixos module that i can look to for reference, so it'd be great if someone could help me figure this out!

Add zinit pm options
@Mrid22 Mrid22 marked this pull request as draft February 21, 2026 20:37
@zimward
Copy link
Collaborator

zimward commented Feb 22, 2026

i think the postHook i implemented in #133 could work for that, though that will leave a bash process running in the background as it requires removing the exec call. so you could run zinit delete every time the wrapper exits to prevent it from leaving state

@Mrid22
Copy link
Author

Mrid22 commented Feb 22, 2026

i think the postHook i implemented in #133 could work for that, though that will leave a bash process running in the background as it requires removing the exec call. so you could run zinit delete every time the wrapper exits to prevent it from leaving state

so im probably missing something here, but i tried putting an echo statement in config.postHook just to test, and that statement does not run nor change the zsh executable file in any way

@zimward
Copy link
Collaborator

zimward commented Feb 22, 2026

most likely. if i add a postHook the wrapper script looks like i would expect

 #!/nix/store/rlq03x4cwf8zn73hxaxnx0zn5q9kifls-bash-5.3p3/bin/bash
 set -o errexit
 set -o nounset
 set -o pipefail
       
 export ZDOTDIR="/nix/store/pb7dgr932iak0gy07xn1m3z705p5spp2-zsh-merged-config"
       
       
 /nix/store/gm8ldbac46x710xlmxanblzvw4yimjzd-zsh-5.9/bin/zsh \
      "--histappend" \
      "--histexpand" \
      "--histfcntllock" \
      "--histignoredups" \
      "--histignorespace" \
      "--histsavenodups" "$@"
 echo meow

@Mrid22
Copy link
Author

Mrid22 commented Feb 23, 2026

the eaziest way to do this would just be to run zinit delete --all because the light/load commands will install the given plugins on startup anyway, so if you remove a plugin, it will get deleted, and then will not reinstall since the command for it is no longer in the RC file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants