Coder Social home page Coder Social logo

zpm-zsh / zpm Goto Github PK

View Code? Open in Web Editor NEW
339.0 6.0 19.0 2.51 MB

Zpm— Zsh Plugin Manager

Home Page: https://github.com/zpm-zsh/zpm

License: GNU Lesser General Public License v3.0

Shell 98.39% Makefile 1.61%
zpm zsh shell zsh-plugin zpm-plugins android termux linux macos zsh-plugins

zpm's Introduction

Logo

ZPM - Zsh Plugin Manager

Fastest, configurable and extensible zsh plugin manager

Software License Travis Go Report Card

Zpm is a plugin manager for ZSH who combines the imperative and declarative approach. At first run, zpm will do complex logic and generate cache, after that will be used cache only, so it makes this framework to be very fast.

Features

  • Speed. Fastest plugin manager (Really, after the first run, zpm will not be used at all)
  • Compatibility. Zpm plugins are compatible with oh-my-zsh
  • Portability. Zpm runs on Linux, Android, OpenWrt, FreeBSD and macOS
  • Support for async loading
  • Dependencies between packages
  • Hooks
  • Function autoloading
  • Extensible
  • Possibility to use github/gitlab/bitbucket mirrors (useful for China)

Table of Contents

Stats

Test on Intel I7-8750H, SanDisk SD7SN6S, 16GB RAM

zsh -i -c exit  0.00s user 0.00s system 102% cpu 0.006 total
zsh -i -c exit  0.01s user 0.00s system 101% cpu 0.006 total
zsh -i -c exit  0.00s user 0.01s system 99% cpu 0.006 total
zsh -i -c exit  0.01s user 0.00s system 102% cpu 0.007 total
zsh -i -c exit  0.00s user 0.00s system 100% cpu 0.007 total
zsh -i -c exit  0.01s user 0.00s system 100% cpu 0.007 total
zsh -i -c exit  0.00s user 0.00s system 101% cpu 0.007 total
zsh -i -c exit  0.00s user 0.00s system 100% cpu 0.006 total
zsh -i -c exit  0.00s user 0.00s system 101% cpu 0.007 total
zsh -i -c exit  0.00s user 0.00s system 100% cpu 0.008 total

Test on Raspberry Pi Zero W, Raspbian 10, 1GHz Broadcom BCM2835 ARMv6, 512MB RAM

zsh -i -c exit  0.14s user 0.05s system 85% cpu 0.219 total
zsh -i -c exit  0.14s user 0.05s system 43% cpu 0.436 total
zsh -i -c exit  0.14s user 0.05s system 58% cpu 0.325 total
zsh -i -c exit  0.12s user 0.07s system 90% cpu 0.206 total
zsh -i -c exit  0.15s user 0.05s system 84% cpu 0.231 total
zsh -i -c exit  0.15s user 0.04s system 46% cpu 0.407 total
zsh -i -c exit  0.13s user 0.06s system 62% cpu 0.306 total
zsh -i -c exit  0.11s user 0.08s system 83% cpu 0.227 total
zsh -i -c exit  0.14s user 0.05s system 47% cpu 0.403 total
zsh -i -c exit  0.11s user 0.08s system 62% cpu 0.307 total

Test on MikroTik RouterBOARD 951Ui-2HnD, OpenWrt 19.07.7, 600MHz Atheros AR9344 MIPS, 128MB RAM

zsh -i -c exit  0.09s user 0.03s system 83% cpu 0.144 total
zsh -i -c exit  0.10s user 0.02s system 29% cpu 0.412 total
zsh -i -c exit  0.10s user 0.02s system 69% cpu 0.173 total
zsh -i -c exit  0.10s user 0.03s system 73% cpu 0.165 total
zsh -i -c exit  0.10s user 0.02s system 81% cpu 0.150 total
zsh -i -c exit  0.10s user 0.02s system 71% cpu 0.170 total
zsh -i -c exit  0.10s user 0.02s system 85% cpu 0.141 total
zsh -i -c exit  0.10s user 0.02s system 42% cpu 0.283 total
zsh -i -c exit  0.11s user 0.02s system 68% cpu 0.176 total
zsh -i -c exit  0.10s user 0.02s system 75% cpu 0.161 total

With this set of plugins. 51 total

zpm-zsh/helpers
zpm-zsh/colors
zpm-zsh/tmux
zpm-zsh/vte
zpm-zsh/core-config
zpm-zsh/ignored-users
zpm-zsh/check-deps
zpm-zsh/minimal-theme
zpm-zsh/material-colors
zpm-zsh/pr-is-root
zpm-zsh/pr-user
zpm-zsh/pr-return
zpm-zsh/pr-exec-time
zpm-zsh/pretty-time-zsh
zpm-zsh/pr-git
zpm-zsh/pr-cwd
zpm-zsh/pr-php
zpm-zsh/pr-rust
zpm-zsh/pr-node
zpm-zsh/pr-2
zpm-zsh/pr-eol
zpm-zsh/pr-zcalc
zpm-zsh/pr-correct
zpm-zsh/ls
zpm-zsh/colorize
zpm-zsh/ssh
zpm-zsh/dot
zpm-zsh/undollar
zpm-zsh/dropbox
lukechilds/zsh-better-npm-completion
zpm-zsh/clipboard
zpm-zsh/mysql-colorize
zpm-zsh/zshmarks
voronkovich/gitignore.plugin.zsh
zpm-zsh/autoenv
mdumitru/fancy-ctrl-z
zsh-users/zsh-history-substring-search
zdharma/fast-syntax-highlighting
zsh-users/zsh-autosuggestions
psprint/history-search-multi-word
zpm-zsh/zpm-readme
zpm-zsh/zpm-info
zpm-zsh/zpm-telemetry
zpm-zsh/zpm-link
@omz/extract
@omz/command-not-found
@omz/pip
@empty/npm
@empty/rustup
zpm-zsh/create-zsh-plugin

Base dependences

Installation

Add the following text into .zshrc

if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh

If you don't have .zshrc copy example of .zshrc from zpm

ln -sf ~/.zpm/zshrc ~/.zshrc

How to use

Currently zpm has following commands

  • load - will download and load plugin See
  • if/if-not - conditions for following command See
  • upgrade - will upgrade plugin, without parameters will upgrade all plugins See
  • clean - will clean zpm cache See

The set of commands can be expanded extended using plugins

Plugins for zpm itself

  • zpm-readme - Show plugin readme in terminal
  • zpm-info - Show plugin info in terminal
  • zpm-telemetry - Send telemetry data. Keep calm. Data is sent using GitHub and you can see it before sending.

Load plugin

Important

Be carefully, zpm doesn't guarantee loading order in call. So if you need to load a plugin before antoher, you should do 2 separate zpm load calls. This is very important for oh-my-zsh plugins, because @omz-core should be loaded before

Plugin name must have next form: @plugin-type/user/plugin-name. This plugin can be enabled using

# Add to `~/.zshrc` after zpm initialization:
zpm load @plugin-type/user/plugin-name

Notice: if you change ~/.zshrc, you need to remove zpm cache using: zpm clean

Additionaly they can have some tags. Tags must be separated by commas , without spaces, tag parameters must be separated from tag names or another tag parameters by :

# plugin type
#    |   plugin name
#    |      |     tag
#    |      |      |  tag parameters,
#    |      |      |  divided by `:`    boolean tag
#    |      |      |         |              |
#    ↓      ↓      ↓         ↓              ↓
@type/some/plugin,apply:source:path:fpath,async

Plugin name

If plugin name starts with @word, this word will be used as plugin type. Plugin name will be used to detect plugin origin url.

  • @github/ or @gh/ - plugin will be cloned from GitHub, this is default value, so you don't need to set it

  • @gitlab/ or @gl/ - plugin will be cloned from GitLab

  • @bitbucket/ or @bb/ - plugin will be cloned from Bitbucket

  • @git/ - plugin will be cloned via git. Be careful, zpm can't detect origin for this plugin type, you must specify origin using tag origin:

  • @gist/ - plugin will be downloaded from GitHub Gist

  • @omz/ - zpm will use a plugin from oh-my-zsh, oh-my-zsh will be download if not installed. Important: you shoud load @omz before any other plugin from on-my-zsh: zpm load @omz.

    • @omz/theme/ - will load a theme from omz dir: <omz-dir>/themes/*.zsh-theme

    • @omz/lib/ - will load a lib from omz dir: <omz-dir>/lib/*.zsh

    • Example:

      See: #24

      # Pull in OMZ (doesn't actually source anything)
      zpm load @omz
      
      # Load any OMZ libraries we want or our OMZ plugins require
      zpm load                \
        @omz/lib/compfix      \
        @omz/lib/completion   \
        @omz/lib/directories  \
        @omz/lib/functions    \
        @omz/lib/git          \
        @omz/lib/grep         \
        @omz/lib/history      \
        @omz/lib/key-bindings \
        @omz/lib/misc         \
        @omz/lib/spectrum     \
        @omz/lib/theme-and-appearance
      
        # Load some OMZ plugins and theme
        zpm load          \
          @omz/virtualenv \
          @omz/git
      
        zpm load @omz/theme/robbyrussell

  • @dir - special type, zpm will create a symlink to local directory from origin tag

  • @file - special type, zpm will create a symlink to file from origin tag. Should be used for plugins that are written in single file, without additional dependencies

  • @remote/ - plugin will be downloaded using curl, for example from an HTTP site. Be careful, zpm can't detect origin for this plugin type, you must specify origin using tag origin:

  • @exec/ - special type, zpm will create plugin, completion or binary via executing of origin tag content. See destination tag

  • @empty/ - special type, zpm will create empty dir without files. Useful with hook tag.

plugin-from/github  # @github doesn't necessary
@gitlab/plugin-from/gitlab
@bitbucket/plugin-from/bitbucket
@omz/some-plugin
@empty/custom/empty-plugin
@empty/another-empty-plugin

Plugin tags

apply tag

This tag has 3 possible arguments divided by :

  • source - load zsh plugin file, enabled by default. File name can be changed using source tag
  • path - add directory to your $PATH, by default - /bin dir, enabled by default. Directory name can be changed using path tag
  • fpath - add directory to your $fpath, by default or /functions dir if it exists, or plugin root dir if exist at least one _* file, enabled by default. Directory name can be changed using fpath tag
zpm load some/plugin,apply:source:path:fpath
zpm load another/plugin,apply:path # zpm will only add /bin dir to $PATH, plugin will not be sourced, nor be added to $fpath

async tag

If this tag is present, zsh plugin will be loaded async

source tag

Define own file that will be loaded

zpm some/plugin,source:/other.file.zsh

path and fpath tags

Using these tags you can change the destination of folders which will be added to $PATH or $fpath

zpm some/plugin,path:/executables
zpm another/plugin,fpath:/completions

autoload tag

This tag defines functions that will be autoloaded by zpm (using autoload -Uz) divided by :

zpm load some/plugin,autoload:one:two:three

origin tag

All plugins have internal origin type property, like: git, dir, file, remote. You can define own origin, but you can't mix different types of origin types. So, you can define Gitlab origin for GitHub plugin, or different origin for GitHub Gist plugin.

  • Git plugins: @github, @gitlab, @bitbucket, @git
zpm load some/plugin,origin:https://github.com/another/origin # This plugin will be loaded from https://github.com/another/origin, but will have internal name some/plugin

zpm load @git/my-plugin,git://my.site/plugin.git # This plugin will be loaded from 3-party origin
  • Remote: @gist, @remote
zpm load @gist/user/hash,origin:https://another-site/file.zsh # This file will be downloaded instead of gist
zpm load @remote/plugin,origin:https://mysite.com/plugin.zsh # In this case origin should be declared, because zpm can't detect origin
  • Dir: @dir
zpm load @dir/plugin,origin:/home/user/Projects/plugin # Internal plugin directory will be linked to your local directory
  • File: @file
zpm load @file/plugin-file,origin:/home/user/Projects/plugin.zsh # Internal plugin file will be linked to your local file
  • Some special types, like: @empty, @omz, @omz/theme, @omz/lib

Do not declare own origin:, because this can produce side effects

hook tag

This tag parameter contains command who will be run in the plugin directory after instalation or upgrade

zpm plugin/name,hook:"make; make install"

if and if-not conditions

If condition allows you to run the following commands only if the condition is true

zpm if some-condition (another commands)

Conditions:

  • linux - if current OS is Linux
  • bsd - if current OS is *BSD
  • openwrt - if current OS is OpenWrt
  • macos - if current OS is macOS
  • termux - if current session run in Termux
  • ssh - if session run on remote host
  • vte - if session run on VTE based terminal emulator

Result of condition can be negated using if-not tag

The condition can be combined zpm if macos if-not ssh load repo/plugin

Notice: conditions will be verified only at first run, after that will be used generated cache

Upgrade

Run zpm upgrade for upgrading, or run zpm upgrade some-plugin another-plugin if you want to upgrade only these plugins

Clean

By default zpm will generate cache file at first run, but if you will change ~/.zshrc this cache should be removed using zpm clean command

Configuration

You can use another mirror for GitHub/Gitlab/Bitbucket:

# Declare this before zpm load
GITHUB_MIRROR="https://hub.fastgit.org"
GITLAB_MIRROR="Some url"
BITBUCKET_MIRROR="Some url"

Troubleshooting

Powerlevel10k

Powerlevel10k loads extra modules in its installation directory, which it automatically detects by taking the file containing its init code, making it absolute, and taking its directory. However, as zpm combines plugins into one fast-loading cache file, this automatic detection would break.

As a workaround, you have to explicitly tell Powerlevel10k where it is installed. This needs to be done before the cache file is loaded, which means before zpm itself is loaded, like this:

# Adjust the path accordingly if your zpm is not installed at `~/.zpm` or you're
# using a powerlevel10k fork
export POWERLEVEL9K_INSTALLATION_DIR=~/.zpm/plugins/romkatv---powerlevel10k
source ~/.zpm/zpm.zsh

# ...

zpm load romkatv/powerlevel10k

Update to latest zpm

If you have problems with zpm try updating:

rm -rf "${TMPDIR:-/tmp}/zsh-${UID:-user}" # clear the cache
cd ~/.zpm
git pull

Developing process

You can see debug information by setting the system variable DEBUG=zpm

When you make changes, add information about them to the change log in next section. Also add link to pr and link to your GitHub profile.

TODO

  • Create logo
  • Improve readme
    • Describe installation process
  • Improve completions
    • Now zpm load, zpm upgrade or zpm subcommand will complete only one argument

Changelog

  • 6.0

    • Add workarouds for powerlevel10k, zsh-syntax-highlighting, zsh-history-substring-search, sindresorhus/pure
  • 5.3

    • Change plugin file path detector
  • 5.2

    • Remove old omz tag
  • 5.1

    • Change internal functions
  • 5.0

    • Removed gen-plugin and gen-completion tags
    • @omz-theme/ and @omz-lib/ changed to @omz/theme/ and @omz/lib/
  • 4.2

    • Replace $ZERO with $0. Fixed #43
    • Update README. #44
  • 4.1

    • Added possibility to change parallel runner, e.g. GNU Parallel, Rush, Xargs
    • Optimize plugin load
    • Change some plugin urls
  • 4.0

    • Refactoring of internal logic
    • Added new plugin types: @gist, @remote
  • 3.6

    • Added new plugin types @dir and @file
    • @link now is an alias for @dir
    • Fixed #35
  • 3.5

    • Added new logo
    • Added possibility to use mirrors for GitHub/Gitlab/Bitbucket. See issue
  • 3.4

    • Added GNU Parallel
  • 3.3

    • Added origin tag
    • Removed autoload-all tag
  • 3.2

    • Fix plugin load order
    • Use sched for background run
  • 3.1

    • Fix completions
    • Add example for @omz
  • 3.0

    • Remove unused @link
    • Remove tr calls
    • Deprecate type: tag
    • Internal changes for basename/name,hyperlink
    • Add support for oh-my-zsh themes and libs
      • zpm load @omz-theme/theme-name
      • zpm load @omz-lib/lib
    • Upgrade from 2.x:
      • Add zpm load @omz if you use at least one oh-my-zsh plugin.
      • Replace type:plugin-type with @plugin-type/plugin/name
  • 2.3

    • Improve README
    • Remove suppot for zsh_loaded_plugins
    • Add config for Markdownlint
  • 2.2

    • Add support for OpenWrt
    • Improve oh-my-zsh-support @igetgames
    • Support for calling plugin functions from command tags @igetgames
    • Fix autoload option processing @igetgames
  • 2.1

    • Optimizations
    • Now all content of /functions and /bin will be copied into single dir, in zpm cache dir
    • Change zpm to @zpm
    • Remove unused vars
    • Some vars will be loaded async
    • Fixed colors
    • Notes
      • Now for update zpm need to run zpm u @zpm
  • 2.0

    • omz/ prefix replaced by @omz/
    • Added plugin type empty
    • Added autoload and autoload-all tags
    • Added gen-plugin and gen-completion tags
    • Notes:
      • Replace omz/ to @omz/ in your .zshrc

zpm's People

Contributors

grigorii-horos avatar grigorii-horos-ukad-group avatar imgbotapp avatar kisaragi-hiu avatar luckywindsck avatar marcusrbrown avatar mnowotnik avatar paulomcnally avatar tomprince avatar unixorn avatar ursm avatar usersv4 avatar wweir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

zpm's Issues

@omz-lib does not add functions to shell

Describe the bug

Some OMZ libraries have utility functions that are used by plugins at call time.

To Reproduce

  1. Setup ZPM, and add zpm load @omz-lib/git
  2. Go to a git repository.
  3. Run git_current_branch

Expected behavior

The command outputs the name of the current git branch via the function defined in the OMZ git lib.

Additional context

zsh 5.8 (x86_64-apple-darwin20.1.0)

Unable to load zsh-history-substring-search

How to load zsh-history-substring-search?

Trying to understand why zsh-history-substring-search is not loading. Is there a custom implementation that you're testing against (using).

Remove comment see full file:

  94   │ #zpm load @github/zsh-users/zsh-syntax-highlighting
  95   │ #zpm load @github/zsh-users/zsh-completions
  96   │ zpm load @github/zsh-users/zsh-history-substring-search
  97   │ #zpm load @github/zsh-users/zsh-autosuggestions

Get error:

(anon):source:3: no such file or directory: /Users/tkolleh/zsh-history-substring-search.zsh
  • OS: macOS 12.0.1 21A559 arm64
  • Host: MacBookPro18,3
  • Shell: zsh 5.8
  • Terminal: iTerm2
  • CPU: Apple M1 Pro

Error on initial install

Describe the bug
Error after fresh install

To Reproduce
Steps to reproduce the behavior:

xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
Install zpm-zsh/helpers ✔

Expected behavior
no errors

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux arch 5.12.15-arch1-1 #1 SMP PREEMPT Wed, 07 Jul 2021 23:35:29 +0000 x86_64 GNU/Linu
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Just a fresh install

Problems with Pure prompt

Hi there,

First off thanks for writing open source software, I really appreciate it! I really liked zpm and was frustrated that it didn't work, but totally understand that these things happen.:-)

This is a follow up from the Reddit thread where you requested that I try and duplicate the problem I mentioned there.

Currently I'm running zgenom with this config and it works as expected:

if [[ ! -f "${HOME}/.zgenom/zgenom.zsh" ]]; then
  git clone https://github.com/jandamm/zgenom.git "${HOME}/.zgenom"
fi

source "${HOME}/.zgenom/zgenom.zsh"
zgenom autoupdate 						# check for updates ever 7 days

if ! zgenom saved; then
  zgenom load mafredri/zsh-async
  zgenom load sindresorhus/pure
  zgenom load hlissner/zsh-autopair
  zgenom load zsh-users/zsh-completions
  zgenom load supercrabtree/k
  zgenom load zsh-users/zsh-autosuggestions
  zgenom load zdharma/fast-syntax-highlighting
  zgenom load zdharma/history-search-multi-word
  zgenom load adamshand/zsh-iterm2
  zgenom save
fi

I converted that to a zpm versoin that looks like this (this is on a Debian testing server):

if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh

zpm load mafredri/zsh-async
zpm load sindresorhus/pure
zpm load hlissner/zsh-autopair
zpm load zsh-users/zsh-completions
zpm load supercrabtree/k
zpm load zsh-users/zsh-autosuggestions
zpm load zdharma/fast-syntax-highlighting
zpm load zdharma/history-search-multi-word
zpm load adamshand/zsh-iterm2

Then I exec a new shell and it seems to work correctly:

❯ exec zsh
Cloning into '/home/adam/.zpm'...
remote: Enumerating objects: 6174, done.
remote: Counting objects: 100% (211/211), done.
remote: Compressing objects: 100% (142/142), done.
remote: Total 6174 (delta 112), reused 131 (delta 59), pack-reused 5963
Receiving objects: 100% (6174/6174), 2.08 MiB | 3.55 MiB/s, done.
Resolving deltas: 100% (3837/3837), done.
Install zpm-zsh/helpers ✔
Install mafredri/zsh-async ✔
Install sindresorhus/pure ✔
Install hlissner/zsh-autopair ✔
Install zsh-users/zsh-completions ✔
Install supercrabtree/k ✔
Install zsh-users/zsh-autosuggestions ✔
Install zdharma/fast-syntax-highlighting ✔
Install zdharma/history-search-multi-word ✔
Install adamshand/zsh-iterm2 ✔

However when I open a new shell, I get this:

Linux whau 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64
Last login: Tue Aug 17 20:45:43 2021 from 203.109.154.110

(anon):source:3: no such file or directory: /home/adam/async.zsh
prompt_pure_setup:22: async: function definition file not found
(anon):source:2: no such file or directory: /home/adam/zsh-autosuggestions.zsh
prompt_pure_async_init:6: command not found: async_start_worker
prompt_pure_async_init:7: command not found: async_register_callback
prompt_pure_async_init:8: command not found: async_worker_eval
prompt_pure_async_tasks:7: command not found: async_worker_eval
prompt_pure_async_tasks:27: command not found: async_job

❯ cat /etc/debian_version
11.0
prompt_pure_async_tasks:7: command not found: async_worker_eval
prompt_pure_async_tasks:27: command not found: async_job

If I copy the exact same .zshrc to a different server running Debian stable it seems to work fine:

Debian testing versions of tools:

❯ xargs --version; rush --version; parallel --version
xargs (GNU findutils) 4.8.0
rush v0.4.2
GNU parallel 20161222

Debian stable versions of tools:

❯ xargs --version; rush --version; parallel --version
xargs (GNU findutils) 4.6.0.225-235f
rush v0.4.2
GNU parallel 20161222

Happy to provide more details, hope that's helpful.

Cheers from New Zealand,
Adam.

Trying to load local plugins

Describe the bug
I have some local plugins that I want to load

To Reproduce
zsh -c "$(curl -fsSL https://raw.githubusercontent.com/Onfroygmx/dotbench/master/.dot/install.zsh)"
And use:
zpm load @link/plugin,origin:$MODULE_DIR/aliases/aliases.zsh
zpm load @link/plugin,origin:$MODULE_DIR/history/history.zsh
zpm load @link/plugin,origin:$MODULE_DIR/colored-man/colored-man.zsh
zpm load @link/plugin,origin:$MODULE_DIR/dircolor/dircolor.zsh
zpm load @link/plugin,origin:$MODULE_DIR/completion/completion.zsh

Expected behavior
Plugins are loaded or report an error if path is not ok

Additional context
first error:
Can't install home/zpm/.dot/zsh/modules/aliases/aliases.zsh ✖
Can't install home/zpm/.dot/zsh/modules/history/history.zsh ✖
Can't install home/zpm/.dot/zsh/modules/colored-man/colored-man.zsh ✖
Can't install home/zpm/.dot/zsh/modules/dircolor/dircolor.zsh ✖
Can't install home/zpm/.dot/zsh/modules/completion/completion.zsh ✖

Second error:
zpm ~ > zpm clean [1] - 15:58:00#
/home/zpm/.dot/zsh/modules/aliases/aliases.zsh /home/zpm/.zpm/plugins/@link---plugin
Create link for @link/plugin ✔

and then nothing else but plugins are never loaded.

Onf

An issue about PATH

% echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/wweir/.local/bin:/home/wweir/.cargo/bin/home/wweir/.zpm/plugins/zpm-zsh---colors/bin /home/wweir/.zpm/plugins/zpm-zsh---background/bin /home/wweir/.zpm/plugins/chrissicool---zsh-256color/bin /home/wweir/.zpm/plugins/zpm-zsh---colorize/bin /home/wweir/.zpm/plugins/miekg---lean/bin /home/wweir/.zpm/plugins/zdharma---fast-syntax-highlighting/bin /home/wweir/.zpm/plugins/agkozak---zsh-z/bin /home/wweir/.zpm/plugins/tj---git-extras/bin /home/wweir/.zpm/plugins/zsh-users---zsh-history-substring-search/bin /home/wweir/.zpm/plugins/@empty---kubectl/bin /home/wweir/.zpm/plugins/@empty---helm/bin /home/wweir/.zpm/plugins/@empty---rustup/bin /home/wweir/.zpm/plugins/@empty---cargo/bin
%
% # After start a child zsh
% zsh
% echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/wweir/.local/bin:/home/wweir/.cargo/bin/home/wweir/.zpm/plugins/zpm-zsh---colors/bin /home/wweir/.zpm/plugins/zpm-zsh---background/bin /home/wweir/.zpm/plugins/chrissicool---zsh-256color/bin /home/wweir/.zpm/plugins/zpm-zsh---colorize/bin /home/wweir/.zpm/plugins/miekg---lean/bin /home/wweir/.zpm/plugins/zdharma---fast-syntax-highlighting/bin /home/wweir/.zpm/plugins/agkozak---zsh-z/bin /home/wweir/.zpm/plugins/tj---git-extras/bin /home/wweir/.zpm/plugins/zsh-users---zsh-history-substring-search/bin /home/wweir/.zpm/plugins/@empty---kubectl/bin /home/wweir/.zpm/plugins/@empty---helm/bin /home/wweir/.zpm/plugins/@empty---rustup/bin /home/wweir/.zpm/plugins/@empty---cargo/bin:/home/wweir/.local/bin:/home/wweir/.cargo/bin/home/wweir/.zpm/plugins/zpm-zsh---colors/bin /home/wweir/.zpm/plugins/zpm-zsh---background/bin /home/wweir/.zpm/plugins/chrissicool---zsh-256color/bin /home/wweir/.zpm/plugins/zpm-zsh---colorize/bin /home/wweir/.zpm/plugins/miekg---lean/bin /home/wweir/.zpm/plugins/zdharma---fast-syntax-highlighting/bin /home/wweir/.zpm/plugins/agkozak---zsh-z/bin /home/wweir/.zpm/plugins/tj---git-extras/bin /home/wweir/.zpm/plugins/zsh-users---zsh-history-substring-search/bin /home/wweir/.zpm/plugins/@empty---kubectl/bin /home/wweir/.zpm/plugins/@empty---helm/bin /home/wweir/.zpm/plugins/@empty---rustup/bin /home/wweir/.zpm/plugins/@empty---cargo/bin

When terminal is opened for the first time it works, next time terminal is opened it doesn't work

I have a quite simple config in .zshrc. When I open terminal for the first time it works. Next time I open it I get

Last login: Mon Nov  1 15:51:14 on ttys002
(anon):source:3: no such file or directory: /Users/myuser/zsh-history-substring-search.zsh

I am on macOS Big Sur 11.6. zsh version is 5.8. My config is quite simple at the moment

if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh
zpm load zsh-users/zsh-history-substring-search

When I run rm -rf "${TMPDIR:-/tmp}/zsh-${UID:-user}" and open terminal again it works fine but next time I open terminal it show me that error again.

Does not work with zdharma/history-search-multi-word

I load the plugin as follows:

zpm load zdharma/history-search-multi-word

Ctrl+R issues the error:

_zsh_highlight_call_widget:3: history-search-multi-word: function definition file not found

However when I source history-search-multi-word.plugin.zsh manually it starts working just fine (eval "$(<plugin)", as described in the standard, works as well).

I've tried adding ,source:history-search-multi-word.plugin.zsh with no effect.

What might be causing this?

zpm tries to source files in my current directory, instead of the plugin directory

Describe the bug
When starting a shell, I get an error message saying "Cannot source /<plugin.zsh>"

To Reproduce

zpm load @omz
zpm load @omz/osx

Expected behavior
I expect the plugin to be loaded, and not exit the startup procedure.

Additional context

When I look at the source code of the affected plugins, it seems that ${0:A:h}, which if often used to reference the directory of the file being sourced / executed, resolves to my current directory.

Support load plugin from command output, just like: kubectl

Some command-line tools contain its own completion script, just like: docker / kubectl / helm.

source <(kubectl completion zsh)

How about adding a new load type of loading from the command line output?
The async load logic should be useful to load such a big script of kubectl output.

Calling xargs with -P0 on mac fails

Line 180 in lib/functions.zsh:
xargs -0 -P0 -n1 "${_ZPM_DIR}/bin/_ZPM-plugin-helper" install

results in

xargs: max. processes must be >0

on macOS, killing ZPM and leaves a bit of a mess. Some cached scripts get made, but the clean function doesn't get added.

changing -P0 to -P1 fixes the issue.

themes?

How do i enable a theme in zpm?

Zpm telemetry

OS Info

Info Value
OS ManjaroLinux 20.0.1 Lysia
zsh version zsh 5.8 (x86_64-pc-linux-gnu)

Zpm info

Info Value
Git branch master
Git commit 68c2aa2077dffca83c891d835c0a5712a0e37347

Plugins

Name Type Async Full
zpm-zsh/pr-is-root github true zpm-zsh/pr-is-root,async
zpm-zsh/rust github true zpm-zsh/rust,async
voronkovich/gitignore.plugin.zsh github true voronkovich/gitignore.plugin.zsh,async
zpm-zsh/ignored-users github true zpm-zsh/ignored-users,async
zsh-users/zsh-autosuggestions github true zsh-users/zsh-autosuggestions,source:zsh-autosuggestions.zsh,async
zpm-zsh/pr-2 github true zpm-zsh/pr-2,async
zpm-zsh/ls github true zpm-zsh/ls,async
zpm-zsh/undollar github true zpm-zsh/undollar,async
zpm-zsh/zshmarks github true zpm-zsh/zshmarks,async
zdharma/fast-syntax-highlighting github true zdharma/fast-syntax-highlighting,async
zpm-zsh/ssh github true zpm-zsh/ssh,async
zpm-zsh/autoenv github true zpm-zsh/autoenv,async
rustup mkdir true rustup,type:mkdir,gen-comp:rustup completions zsh,async
zpm-zsh/colorize github true zpm-zsh/colorize,async
zpm-zsh/dot github true zpm-zsh/dot,async
zpm-zsh/pr-git github true zpm-zsh/pr-git,async
zpm-zsh/helpers github false zpm-zsh/helpers
zpm-zsh/pr-zcalc github true zpm-zsh/pr-zcalc,async
zpm-zsh/pr-exec-time github true zpm-zsh/pr-exec-time,async
zsh-users/zsh-history-substring-search github true zsh-users/zsh-history-substring-search,source:zsh-history-substring-search.zsh,async
omz/wp-cli omz true omz/wp-cli,async
zpm-zsh/zpm-telemetry github false zpm-zsh/zpm-telemetry
omz/command-not-found omz true omz/command-not-found,async
zpm-zsh/check-deps github false zpm-zsh/check-deps
zpm-zsh/pr-node github true zpm-zsh/pr-node,async
sindresorhus/pretty-time-zsh github true sindresorhus/pretty-time-zsh,fpath:/,async
zpm-zsh/mysql-colorize github true zpm-zsh/mysql-colorize,async
zpm-zsh/zsh-completions github false zpm-zsh/zsh-completions,apply:fpath
zpm-zsh/background github false zpm-zsh/background
zpm-zsh/pr-correct github true zpm-zsh/pr-correct,async
zpm-zsh/pr-user github false zpm-zsh/pr-user
lukechilds/zsh-better-npm-completion github true lukechilds/zsh-better-npm-completion,async
zpm-zsh/minimal-theme github false zpm-zsh/minimal-theme
zpm-zsh/clipboard github true zpm-zsh/clipboard,async
zpm-zsh/core-config github false zpm-zsh/core-config
zpm-zsh/zpm-readme github true zpm-zsh/zpm-readme,async
zpm-zsh/vte github false zpm-zsh/vte
zpm-zsh/zpm-info github true zpm-zsh/zpm-info,async
omz/extract omz true omz/extract,async
zpm-zsh/pr-cwd github true zpm-zsh/pr-cwd,async
zpm-zsh/material-colors github true zpm-zsh/material-colors,async
agkozak/zsh-z github true agkozak/zsh-z,async
zpm zpm false zpm
zpm-zsh/pr-php github true zpm-zsh/pr-php,async
psprint/history-search-multi-word github true psprint/history-search-multi-word,fpath:/,async
mdumitru/fancy-ctrl-z github true mdumitru/fancy-ctrl-z,async
zpm-zsh/tmux github false zpm-zsh/tmux,apply:path
kubectl mkdir true kubectl,type:mkdir,gen-pl:kubectl completion zsh,async
zpm-zsh/colors github false zpm-zsh/colors
zpm-zsh/dropbox github true zpm-zsh/dropbox,async
zpm-zsh/template github true zpm-zsh/template,async
zpm-zsh/pr-rust github true zpm-zsh/pr-rust,async
zpm-zsh/pr-return github true zpm-zsh/pr-return,async
zpm-zsh/pr-eol github true zpm-zsh/pr-eol,async

zpm load @omz doesn't appear to actually initialise OMZ

In a recent change to the Readme, ZPM suggests to run zpm load @omz before loading any OMZ plugins or themes. I was assuming this is intended to source the root oh-my-zsh.sh file in the OMZ repository, which does some setup and loads all the framework libraries. This doesn't appear to work at the moment though - turning on debugging and running zpm load @omz after cleaning zpm shows:

zpm:init Initialize '@omz'
zpm:init:source Plugin file for @omz is missing

Trying to do this manually with zpm load @omz,source:oh-my-zsh.sh does work the first time, but when the cached version tries to run next time I open the shell there's messiness with the $ZSH variable pointing to the ZPM cache, so it can't find files from the OMZ repository like lib/compfix.zsh

I'm currently getting around most of this successfully just by manually loading all of the individual OMZ libraries I need instead:

zpm load                        \
  @omz-lib/compfix              \
  @omz-lib/completion           \
  @omz-lib/directories          \
  @omz-lib/functions            \
  @omz-lib/git                  \
  @omz-lib/grep                 \
  @omz-lib/history              \
  @omz-lib/key-bindings         \
  @omz-lib/misc                 \
  @omz-lib/nvm                  \
  @omz-lib/spectrum             \
  @omz-lib/theme-and-appearance

What is the recommended way to get OMZ plugins running via ZPM?

Support for custom commands when loading

Is your feature request related to a problem? Please describe.
starship doesn't work without this 'eval "$(starship init zsh)"'

Describe the solution you'd like

add a tag smth like blah/blah,cmd:'eval "$(starship init zsh)"'

Describe alternatives you've considered
obviously using other prompts
Additional context
There might currently be a way to do this, but I just can't find it

It doesn't work until upgrade

Describe the bug
The shell continues being the default zsh shell after installing everything

To Reproduce

zpm clean; rm -rf zpm

#!/usr/bin/env zsh

source ~/.zpm/zpm.zsh 2>/dev/null || {
  git clone https://github.com/zpm-zsh/zpm ~/.zpm
  source ~/.zpm/zpm.zsh
}

zpm load zpm-zsh/minimal-theme

zpm if-not ssh load                                   \
  zpm-zsh/zsh-autosuggestions,async                   \
  zpm-zsh/fast-syntax-highlighting,async              \
  zpm-zsh/nvm

source ~/.zshrc.local 2>/dev/null

Expected behavior
When opening a new Terminal window (Windows Terminal + WSL in my case) it should show the minimal theme with zsh-autosuggestions and syntax highlighting but that doesn't work until you run zpm upgrade

Additional context

does not work with zsh-users/zsh-syntax-highlighting

when adding zpm load @github/zsh-users/zsh-syntax-highlighting,source:zsh-syntax-highlighting.zsh to the .zshrc I get this error:

(anon):43: no such file or directory: /home/jonas/.version
(anon):44: no such file or directory: /home/jonas/.revision-hash
zsh-syntax-highlighting: highlighters directory '/home/jonas/highlighters' not found.
zsh-syntax-highlighting: failed loading highlighters, exiting.

When I type zpm clean it works again, but when I start a new shell its throwing this error again. I tried adding path:/highlighters but that didn't change anything.

Do you know what i'd need to change to get it working with zpm?

plugin source: https://github.com/zsh-users/zsh-syntax-highlighting/

report error when start with zsh-users/zsh-history-substring-search

put zpm load zsh-users/zsh-history-substring-search into .zshrc

run zsh, it report:
/var/folders/ss/nftfg4t90cj6546f877r5rf40000gn/T//zsh-501/zpm-cache.zsh:source:1881: no such file or directory: /private/var/folders/ss/nftfg4t90cj6546f877r5rf40000gn/T/zsh-501/zsh-history-substring-search.zsh
图片

Bookmarks plugin doesnt work

Describe the bug
Bookmarks plugin doesnt work on M1 MacOS Ventura 13.1.

To Reproduce
Fresh install and added this to .zshrc:

if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh

zpm load "zpm-zsh/zshmarks"

After reloading terminal and confirming zpm is installed and working by typing zpm, none of the Bookmark commands work like c, mark, etc. The directory .zpm/plugins/zpm-zsh---zshmarks exists.

a few different errors

Describe the bug

Skip install zpm ✖
Unknown command `zpm zpm-zsh/colors,inline`, treat as `zpm load zpm-zsh/colors,inline`
_tags:comptags:36: can only be called from completion function
_tags:comptry:55: can only be called from completion function
_tags:comptags:60: can only be called from completion function
_tags:comptags:67: can only be called from completion function
/data/data/com.termux/files/home/.zpm/plugins/NgoKimPhu---zsh-git-escape-magic/git-escape-magic.plugin.zsh:9: git-escape-magic: function definition file not found
Install @omz/glob-alias ✔
Install @omz/last-working-directory ✔

Note: everytime I open a shell, I get the above printed each time, the last 2 installs are always installed "successfully" but they are in fact broken symlinks.

To Reproduce
(apologies for github's formatting!) $ZDOTDIR/.zshrc:

source ~/.zpm/zpm.zsh 2>/dev/null || {
  git clone https://github.com/zpm-zsh/zpm ~/.zpm
  source ~/.zpm/zpm.zsh
}

# general plugins
zpm load \
  zpm-zsh/rust,async                                  \
  zpm-zsh/check-deps                                \
  zpm-zsh/extract,async                             \
  zpm zpm-zsh/zpm-info,async                 \
  zpm zpm-zsh/zpm-readme,async           \
  zpm-zsh/check-deps,async                      \
  zpm-zsh/ls,async                                        \
  zpm-zsh/colorize,async                             \
  zpm-zsh/ssh,async                                    \
  zpm-zsh/pretty-time,async                       \
  zpm-zsh/template,async                          \
  zpm-zsh/pr-is-root,async                          \
  zpm-zsh/pr-jobs,async                              \
  zpm-zsh/background,async                     \
  zsh-vi-more/vi-motions,async                  \
  zsh-vi-more/vi-quote,async                       \
  zsh-vi-more/ex-commands,async            \
  zsh-vi-more/directory-marks,async          \
  willghatch/zsh-saneopt                              \
  willghatch/zsh-snippets,async                  \
  willghatch/zsh-cdr,async                              \
  MichaelAquilina/git-commands,async        \
  MichaelAquilina/zsh-you-should-use,async \
  MichaelAquilina/zsh-history-filter,async       \
  mafredri/zsh-async,async                               \
  qoomon/zsh-lazyload                                      \
  zsh-hooks/zsh-hooks                                      \
  agkozak/zhooks,async                                    \
  b4b4r07/zsh-vimode-visual,async                \
  Tarrasch/zsh-functional,async                      \
  junegunn/fzf,async                                         \
  paulirish/git-open,async                                 \
  felipec/git-completion,async                         \
  mafredri/zsh-async                                         \
  hchbaw/zce.zsh,async                                   \
  aykamko/tag,async                                         \
  mollifier/cd-gitroot,async                               \
  MenkeTechnologies/zsh-expand,async       \
  michaelxmcbride/zsh-dircycle,async           \
  mollifier/anyframe,async                               \
  RobertAudi/tsm,async                                    \
  knu/zsh-manydots-magic,async                   \
  knu/zsh-easy-vcs-status,async                     \
  knu/zsh-delsel-mode,async                           \
  knu/imerge,async                                            \
  knu/p,async                                                      \
  knu/e,async                                                      \
  knu/g,async,apply:path                                   \
  NgoKimPhu/zsh-git-escape-magic,async     \
  tj/git-extras,async                                             \
  gitbits/git-ls-branches,async                          \
  caarlos0-graveyard/zsh-open-pr,async         \
  zdharma-continuum/zsh-cmd-architect,async

# oh-my-zsh
zpm load @omz
zpm load \
  @omz/vi-mode                            \
  @omz/fzf,async                          \
  @omz/deno,async                      \
  @omz/gh,async                           \
  @omz/golang,async                    \
  @omz/rust,async                          \
  @omz/perms,async                      \
  @omz/safe-paste,async               \
  @omz/shrink-path,async              \
  @omz/web-search,async              \
  @omz/adb,async                            \
  @omz/otp,async                             \
  @omz/pip,async                              \
  @omz/pass,async                           \
  @omz/ripgrep,async                        \
  @omz/fd,async                                 \
  @omz/git-extras,async                    \
  @omz/glob-alias,async                    \
  @omz/ssh-agent,async                    \
  @omz/gpg-agent,async                    \
  @omz/keychain,async                      \
  @omz/term_tab,async                      \
  @omz/transfer,async                         \
  @omz/extract,async                          \
  @omz/universalarchive,async          \
  @omz/last-working-directory,async \
  @omz/zsh-interactive-cd,async

# desktop/laptop
zpm if-not termux load zpm-zsh/ignored-users,async

# not ssh
zpm if-not ssh load \
  zpm-zsh/clipboard,async                                    \
  zpm-zsh/zsh-history-substring-search,async  \
  zpm-zsh/zsh-autosuggestions,async               \
  zpm-zsh/fast-syntax-highlighting,async           \
  zpm-zsh/history-search-multi-word,async       \
  @omz/wd,async                                                   \
  voronkovich/gitignore.plugin.zsh,async           \

Expected behavior
The errors are likely my own fault!

Additional context
THANK YOU so much for the best plugin manager I've ever tried!

How to chenge the default @omz link?

Hi, I come from China, the original oh-my-zsh link address(https://github.com/ohmyzsh/ohmyzsh) is slow beacuse China's country network firewall.
So I was wondering if zpm cound change the default @omz address?
I always use https://hub.fastgit.org/ to replace https://github.com/. hub.fastgit.org is a China mirror of github.

Thanks! :-)

Iterm session exiting when using cache

I've just installed zpm and had to debug this message

Usage: add-zsh-hook hook function
Valid hooks are:
  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name

I have found that if I delete the cache the terminal works correctly and doesn't exit. Any sessions after this one will show the error above and then exit. I think it might be something to do with autoloading add-zsh-config

macOS installation error

Describe the bug

Error after installing zpm to macOS .zshrc

$ 
(anon):26: redirection with no command
(anon):24: no matches found: /Users/joao.zaniolo/.zpm/plugins/zpm-zsh---material-colors/dircolors/*.dircolors
$ 
[3]    exit 1     for file in "${_DIRNAME}/dircolors/"*.dircolors; do; cat "$file"; done
$ 

CleanShot 2022-03-25 at 1 11 46@2x

To Reproduce

Add the following to ~/.zshrc

#!/usr/bin/env zsh

source ~/.zpm/zpm.zsh 2>/dev/null || {
  git clone https://github.com/zpm-zsh/zpm ~/.zpm
  source ~/.zpm/zpm.zsh
}

zpm load zpm-zsh/minimal-theme

zpm if-not ssh load                                   \
  zpm-zsh/zsh-autosuggestions,async                   \
  zpm-zsh/fast-syntax-highlighting,async              \
  zpm-zsh/nvm,async

source ~/.zshrc.local 2>/dev/null

Expected behavior

Everything working fine

Additional context

Environment variable `path` and `fpath` is broken

Describe the bug

fpath is broken.

/tmp/zsh-1001/zpm-cache.zsh:3: compinit: function definition file not found

Sometimes path is also broken (command mkdir is not found message).

To Reproduce

Please add this to your ~/.zshenv:

typeset -Ux path fpath

Expected behavior

There should not be bug in initialize.

Additional context

Its cause is on line 22 in zpm.zsh.
typeset -aU will overwrite variable if it already exists. Maybe using typeset -gaU instead (to decrale global variable) will resolve this issue.
Also, commenting out is faster way.

zpm upgrade report xargs warning

Describe the bug

execuete zpm upgrade, then it report

xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

Screenshots
image

Can't upgrade @zpm

Describe the bug
During every upgrade zpm reports: Can't upgrade @zpm ✖

To Reproduce
Bootstrap installation based on README installation:

if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh

run zpm u

Expected behavior
Either Upgrade @zpm ✔, or Skip upgrade @zpm ✔

Bookmarks plugin marks command not working

Describe the bug
Using marks to list bookmarks doesn't work.

To Reproduce

  • Add a couple of entries with mark.
  • Call marks

Expected behavior
Listing of any bookmarks I have added.

Additional context
This is what happens:

❯ marks
@bookmark_join:shift:3: shift count must be <= $#
column: illegal option -- o
usage: column [-tx] [-c columns] [-s sep] [file ...]
@bookmark_join:shift:3: shift count must be <= $#

Zpm telemetry

OS Info

Info Value
OS ManjaroLinux 20.0.1 Lysia
zsh version zsh 5.8 (x86_64-pc-linux-gnu)

Zpm info

Info Value
Git branch master
Git commit 68c2aa2077dffca83c891d835c0a5712a0e37347

Plugins

Name Type Async Full
zpm-zsh/pr-is-root github true zpm-zsh/pr-is-root,async
zpm-zsh/rust github true zpm-zsh/rust,async
voronkovich/gitignore.plugin.zsh github true voronkovich/gitignore.plugin.zsh,async
zpm-zsh/ignored-users github true zpm-zsh/ignored-users,async
zsh-users/zsh-autosuggestions github true zsh-users/zsh-autosuggestions,source:zsh-autosuggestions.zsh,async
zpm-zsh/pr-2 github true zpm-zsh/pr-2,async
zpm-zsh/ls github true zpm-zsh/ls,async
zpm-zsh/undollar github true zpm-zsh/undollar,async
zpm-zsh/zshmarks github true zpm-zsh/zshmarks,async
zdharma/fast-syntax-highlighting github true zdharma/fast-syntax-highlighting,async
zpm-zsh/ssh github true zpm-zsh/ssh,async
zpm-zsh/autoenv github true zpm-zsh/autoenv,async
rustup mkdir true rustup,type:mkdir,gen-comp:rustup completions zsh,async
zpm-zsh/colorize github true zpm-zsh/colorize,async
zpm-zsh/dot github true zpm-zsh/dot,async
zpm-zsh/pr-git github true zpm-zsh/pr-git,async
zpm-zsh/helpers github false zpm-zsh/helpers
zpm-zsh/pr-zcalc github true zpm-zsh/pr-zcalc,async
zpm-zsh/pr-exec-time github true zpm-zsh/pr-exec-time,async
zsh-users/zsh-history-substring-search github true zsh-users/zsh-history-substring-search,source:zsh-history-substring-search.zsh,async
omz/wp-cli omz true omz/wp-cli,async
zpm-zsh/zpm-telemetry github false zpm-zsh/zpm-telemetry
omz/command-not-found omz true omz/command-not-found,async
zpm-zsh/check-deps github false zpm-zsh/check-deps
zpm-zsh/pr-node github true zpm-zsh/pr-node,async
sindresorhus/pretty-time-zsh github true sindresorhus/pretty-time-zsh,fpath:/,async
zpm-zsh/mysql-colorize github true zpm-zsh/mysql-colorize,async
zpm-zsh/zsh-completions github false zpm-zsh/zsh-completions,apply:fpath
zpm-zsh/background github false zpm-zsh/background
zpm-zsh/pr-correct github true zpm-zsh/pr-correct,async
zpm-zsh/pr-user github false zpm-zsh/pr-user
lukechilds/zsh-better-npm-completion github true lukechilds/zsh-better-npm-completion,async
zpm-zsh/minimal-theme github false zpm-zsh/minimal-theme
zpm-zsh/clipboard github true zpm-zsh/clipboard,async
zpm-zsh/core-config github false zpm-zsh/core-config
zpm-zsh/zpm-readme github true zpm-zsh/zpm-readme,async
zpm-zsh/vte github false zpm-zsh/vte
zpm-zsh/zpm-info github true zpm-zsh/zpm-info,async
omz/extract omz true omz/extract,async
zpm-zsh/pr-cwd github true zpm-zsh/pr-cwd,async
zpm-zsh/material-colors github true zpm-zsh/material-colors,async
agkozak/zsh-z github true agkozak/zsh-z,async
zpm zpm false zpm
zpm-zsh/pr-php github true zpm-zsh/pr-php,async
psprint/history-search-multi-word github true psprint/history-search-multi-word,fpath:/,async
mdumitru/fancy-ctrl-z github true mdumitru/fancy-ctrl-z,async
zpm-zsh/tmux github false zpm-zsh/tmux,apply:path
kubectl mkdir true kubectl,type:mkdir,gen-pl:kubectl completion zsh,async
zpm-zsh/colors github false zpm-zsh/colors
zpm-zsh/dropbox github true zpm-zsh/dropbox,async
zpm-zsh/template github true zpm-zsh/template,async
zpm-zsh/pr-rust github true zpm-zsh/pr-rust,async
zpm-zsh/pr-return github true zpm-zsh/pr-return,async
zpm-zsh/pr-eol github true zpm-zsh/pr-eol,async

Telemetry data was generated using zpm-telemetry extension for zpm

autoload theme doesn't work

Describe the bug

I want to load a theme when opening a new terminal, is autoload do that?

To Reproduce

I have tried zpm load romkatv/powerlevel10k,autoload and zpm load @theme/romkatv/powerlevel10k,autoload

They just work in the current shell.

Expected behavior

Autoload without inputting commands.

Additional context

Some plug-ins fail to update if using `setopt GLOB_DOTS`

Describe the bug

I'm not knowledgeable enough about Zsh and Git to understand why this occurs. For some reasons, using setopt GLOB_DOTS causes two of my plug-ins to fail to update with zpm u.

To Reproduce

  1. Use this .zshrc file:
if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh

# This seems to be the culprit. Commented for now, see explanations below.
# setopt GLOB_DOTS

zpm load zdharma-continuum/history-search-multi-word
zpm load zdharma-continuum/fast-syntax-highlighting
  1. Start a new Zsh instance:
Cloning into '/home/xfzv/.zpm'...
remote: Enumerating objects: 6364, done.
remote: Counting objects: 100% (408/408), done.
remote: Compressing objects: 100% (262/262), done.
remote: Total 6364 (delta 237), reused 261 (delta 118), pack-reused 5956
Receiving objects: 100% (6364/6364), 2.12 MiB | 13.66 MiB/s, done.
Resolving deltas: 100% (3958/3958), done.
Install zpm-zsh/helpers ✔
Install zdharma-continuum/history-search-multi-word ✔
Install zdharma-continuum/fast-syntax-highlighting ✔
  1. Run exec zsh
  2. Run zpm u:
Upgrade zpm-zsh/helpers ✔
Upgrade @zpm ✔
Upgrade zdharma-continuum/fast-syntax-highlighting ✔
Upgrade zdharma-continuum/history-search-multi-word ✔
# All plugins update just fine, including the last two
  1. Uncomment setopt GLOB_DOTS in .zshrc and save the modifications

  2. Open a new Zsh instance and run zpm clean (since we've made some changes, as per:

    zpm/README.md

    Line 456 in 06e2630

    By default zpm will generate cache file at first run, but if you will change `~/.zshrc` this cache should be removed using `zpm clean` command
    )

  3. A master.zwc file appears in both

    • ~/.zpm/plugins/zdharma-continuum---fast-syntax-highlighting/.git/refs/heads/
    • ~/.zpm/plugins/zdharma-continuum---history-search-multi-word/.git/refs/heads/
  4. Run zpm u:

Can't upgrade zdharma-continuum/fast-syntax-highlighting ✖
Upgrade @zpm ✔
Can't upgrade zdharma-continuum/history-search-multi-word ✖
Upgrade zpm-zsh/helpers ✔

Manually running git pull in both directories also fails:

cd zdharma-continuum---fast-syntax-highlighting
git pull
fatal: bad object refs/heads/master.zwc
error: https://github.com/zdharma-continuum/fast-syntax-highlighting did not send all necessary objects

cd zdharma-continuum---history-search-multi-word
git pull
fatal: bad object refs/heads/main.zwc
error: https://github.com/zdharma-continuum/history-search-multi-word did not send all necessary objects
  1. Run:
rm -rf ~/.zpm/plugins/zdharma-continuum---fast-syntax-highlighting/     \
       ~/.zpm/plugins/zdharma-continuum---history-search-multi-word/    \
       /tmp/zsh-1000/
  1. Comment setopt GLOB_DOTS in .zshrc and save the modifications.
  2. Open a new Zsh instance and repeat step 4 (run zpm u): both plugins update just fine.

Expected behavior

These two plug-ins are updated just like the others (possibly by avoiding main.zwc creation in both plug-ins repos?)

Additional context

No issue with the other Zsh plugins managers I've tried, the main.zwc file isn't created for any plug-in, including these two.

Hopefully you can reproduce.

(anon):source:27: no such file or directory: /tmp/zsh-1000/internal/p10k.zsh

To Reproduce

Minimal .zshrc:

if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh

zpm load romkatv/powerlevel10k
  1. Quit immediately the initial powerlevel10k setup (doesn't matter, the issue occurs even if we complete it)
  2. The prompt is correctly loaded
  3. Run exec zsh or run a new terminal instance
  4. The following error keeps appearing every time a new shell is spawned:
(anon):source:27: no such file or directory: /tmp/zsh-1000/internal/p10k.zsh

Expected behavior

The plug-in should load normally without any error.

Additional context

This workaround works provided I add the command to my .zshrc file (before sourcing zpm) so that it's run every time. Otherwise, it works only once (until the directory is created again).

No issue whatsoever with other Zsh plugins managers.

Cannot make gen-completion to work

I have the following line zpm load @empty/kubectl,gen-completion:"kubectl completion zsh". With debug enabled I see

zpm:init Initialize '@empty/kubectl'
zpm:init:fpath Add to $fpath '/Users/myuser/.zpm/plugins/@empty---kubectl/functions'
zpm:init:source Plugin file for @empty/kubectl is missing

File /Users/myuser/.zpm/plugins/@empty---kubectl/functions/_kubectl is empty. My impression that it should contain the output of kubectl completion zsh. Thus kubectl completion doesn't work. Am I doing something wrong?

Also, README says to use zpm @empty/rustup,gen-completion:"rustup completions zsh" but zpm will show a warning that load is missing so it looks more correct version is zpm load @empty/rustup,gen-completion:"rustup completions zsh", right?

command not found: check-if

After a fresh install w/o any configuration, using provided zshrc as default zshrc

zpm:10: command not found: check-if
zpm:10: command not found: check-if
zpm:10: command not found: check-if
zpm:18: command not found: check-if
zpm:10: command not found: check-if
zpm:18: command not found: check-if

I'm unable to find what's check-if, did you define this function somewhere else ?

command not found: add-zsh-hook

I added it to my .zshrc file and it gives me this error:

/var/folders/v2/wx3l7mt117q4jygt86g745t00000gp/T//.zpm-cache-JP.zsh:26: command not found: add-zsh-hook

I have oh-my-zsh installed as well as brew

Cant Upgrade error for a lot of packages

I installed zpm today and tried to import a lot of packages that I had from zgen (used previously). I appended the zshrc lines to this post. I run zpm clean after that I run zpm upgrade. Then the following happens:

  • I get a "Can't upgrade X " where X is @github/ael/code/zsh ...., zsh256color, zsh-syntax-highliting and zsh-autosuggestions
  • The upgrade process seems to be stuck after history-search-multi-word and can only be stopped with Ctrl+C.

relevant zshrc:

if [[ ! -f ~/.zpm/zpm.zsh ]]; then
  git clone --recursive https://github.com/zpm-zsh/zpm ~/.zpm
fi
source ~/.zpm/zpm.zsh

zpm load @omz

zpm load                \
  @omz/lib/compfix      \
  @omz/lib/completion   \
  @omz/lib/directories  \
  @omz/lib/functions    \
  @omz/lib/git          \
  @omz/lib/grep         \
  @omz/lib/history      \
  @omz/lib/key-bindings \
  @omz/lib/misc         \
  @omz/lib/spectrum     \
  @omz/lib/theme-and-appearance

zpm load @omz/git
zpm load @omz/archlinux
zpm load @omz/theme/norm
zpm load @omz/mercurial

zpm load zpm-zsh/ls
zpm load @github/zsh-users/zsh-syntax-highlighting
#zpm load chrissicool/zsh-256color

#zpm load @github/chrissicool/zsh-256color
#zpm load MikeDacre/careful_rm
#zpm load @github/zsh-users/zsh-autosuggestions
zpm load @github/changyuheng/fz
#zpm load @github/ael-code/zsh-colored-man-pages
zpm load @github/zdharma-continuum/history-search-multi-word

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.