Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs]: How to install the traditional way? #28

Open
2 of 3 tasks
ppetr opened this issue Sep 5, 2023 · 2 comments
Open
2 of 3 tasks

[docs]: How to install the traditional way? #28

ppetr opened this issue Sep 5, 2023 · 2 comments
Assignees
Labels
documentation 📝 Solely about the documentation of the project.

Comments

@ppetr
Copy link

ppetr commented Sep 5, 2023

Description

I don't want to use zi (because zpmod would be the only thing I'd use it for). And even less so sh <(curl ...). There are multiple reasons against the latter.

  • It doesn't provide system-wide installation of the plugin.
  • It's not possible to integrate this with standard package managers, for example to build a .deb package.
  • There have been far to many security exploits based on this (see for example https://0x46.net/thoughts/2019/04/27/piping-curl-to-shell/ for a discussion).
  • The auto-update part in the install script also is problematic from a sysadmin / security perspective

So I tried:

  • Checking out the repo.
  • ./configure --enable-cflags='-g -Wall -Wextra -O3' --disable-gdbm --without-tcsetpgrp && make -j$(nproc) (it seems that make runs the configure script all over again).
  • module_path+=($PWD/Src/zi) ; zmodload zpmod

But at this point I'm not able to see of/how zpmod is actually running. And where it stores the compiled files. I tried creating directory ~/.zi, but it's not being populated. And zpmod source-study -l shows loading time of some files in the order of 100ms, which I guess means they're not being compiled.


BTW, the links in the bug templates to Contributing Guidelines and Contributor C. Code of Conduts are broken.

Select the area that is associated with this issue.

No response

Self-service

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with the Contributor Covenant Code of Conduct?

Contact Details

No response

@ppetr ppetr added the documentation 📝 Solely about the documentation of the project. label Sep 5, 2023
@ss-o
Copy link
Member

ss-o commented Oct 13, 2023

Hi @ppetr 👋

I am working on your issue and will update you soon.

And where it stores the compiled files.

All files are compiled to the *.zwc for example .zshrc would have .zshrc.zwc next to it.

And zpmod source-study -l shows loading time of some files in the order of 100ms, which I guess means they're not being compiled.

The zpmod source-study -l shows scripts sourced in the current session, i.e.: if you source any script, e.g. source some_script.sh or source ~/.zshenv it will show the loading time of the sourced file. In other words, as mentioned in zpmod -h:

Displays list of files loaded via source or . builtins, with a duration that each
loading lasted, in milliseconds. The module tracks all calls to those builtins and
measures the time each call took. This can be used for e.g. profile loading of plugins,
regardless of the plugin manager used.

@Freed-Wu
Copy link

Freed-Wu commented May 9, 2024

How to install the traditional way

IMO, the tradintional way is source *.plugin.zsh. Perhaps this repo can have a https://github.com/z-shell/zgdbm/blob/main/zgdbm.plugin.zsh to do this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📝 Solely about the documentation of the project.
Projects
None yet
Development

No branches or pull requests

3 participants