zap-zsh / zap Goto Github PK
View Code? Open in Web Editor NEW:zap: Zap is a minimal zsh plugin manager
Home Page: https://www.zapzsh.com/
License: GNU General Public License v3.0
:zap: Zap is a minimal zsh plugin manager
Home Page: https://www.zapzsh.com/
License: GNU General Public License v3.0
No response
No response
Is it possible to load specific snippets like zinit?
https://github.com/zdharma-continuum/zinit#loading-and-unloading
No response
No response
No response
provides higher quality issues and pull requests and makes the pr or issue more clear.
for example in pull requests ask for
This is my .zshrc
[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"
HISTFILE=~/.zsh_history
source "$ZDOTDIR/functions.zsh"
zshsource "exports"
zshsource "aliases"
# Example install plugins
plug "zap-zsh/supercharge"
plug "zsh-users/zsh-autosuggestions"
plug "zap-zsh/zap-prompt"
# Manually source since zap plug doesnt work
source "$HOME/.local/share/zap/plugins/zap-prompt/zap-prompt.zsh-theme"
source "$HOME/.local/share/zap/plugins/supercharge/supercharge.plugin.zsh"
source "$HOME/.local/share/zap/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
zshsource "git"
zshsource "keymaps"
Everything in this file works except lines with plug
. zshsource
does nothing special other than sourcing those files.
Trying to set up on my M1 mac and when I source zap.zsh
I get errors
source "$HOME/.local/share/zap/zap.zsh"
/Users/John.Costanzo/.local/share/zap/zap.zsh:42: defining function based on alias `update'
/Users/John.Costanzo/.local/share/zap/zap.zsh:42: parse error near `()'
The structure of files/directories isn't that expected by the function.
Also, should zapcmp be zapcomp? It's more consistent with zsh: compinit, compdef, etc. And cmp always means compare to me, not complete.
If all plugins are active then it shouldn't ask for input when running activate and similarly for deactivate.
show text next to plugin name indicating if it needs to be updated or if it's already up to date
Instead of adding zap to users existing config, backup their config and generate a new one.
zap update -> zap -u, zap --update
zap pause -> zap -p, zap --pause
my ZDOTDIR is set in .zshenv file in home directory, when running the command on zap website another .zshrc was created in home directory with commands to source zap. I'm assuming this was likely because ZDOTDIR was not picked up by the install script?
I tried installing the spaceship-promt theme and got the message that it wasn't activated. After going through the code I found out,
that when zap sources the plugin, it uses the plugin name and the extension to find the file to source. In case of spaceship-promt the file is actually called spaceship.zsh-theme.
plug "spaceship-prompt/spaceship-prompt"
Install and enable the theme
No response
Ubuntu 22.04
5.8.1
v0.2.0 on commit 3564bef
kitty
None
No response
I'be been having an odd issue with zsh lately. I use WezTerm as my choice terminal emulator running zsh. I can open wezterm and zsh opens in my home directory, after that I'll click new tab or run zsh in my current session. The child instance opens to / instead, and the same issue happens in the tty. I've noticed it only happens when my /zshrc contains plug lines. If I remove them it no longer has the issue with opening to /. I've also tested it in a vm and had the same issue. You can find my zsh configuration on my dotfiles repo under the zsh folder.
Create a systemd-homed user using subvolume storage and use https://raw.githubusercontent.com/thomascft/dotfiles/stow/zsh/.zshrc
Zsh should open to $PWD
No response
Arch Linux
5.9
v0.2.0 on commit ca9e52d
Wezterm
None
I don't have any issues on zplug I'm showing similar issues under zplug, not sure where to post though
Add a link to getnf
in the README file, so people installing zap can get icons working correctly by having an easy method of installing nerd-fonts.
I know this may sound unorthodox, but it would provide easy ways to provide config instead of having vars set in random places, and control when plugins are loaded.
An example:
zapplug "plugin" # Loads plugin
plugin_name::setup arg arg2 # setup plugin
# could also be a bash associative array
and the plugin could look like so
plugin_name::setup() {
local some_arg=$1 # load arguments
local args=$@ # load all args
do_something_with_args somearg args # do something with them
}
Some people may not like this but hey its just my idea ;)
ohmyzsh extract plugin
No response
I' wanna get a way to install plugins that is apart of other project, such as ohmyzsh plugins. The present README doesn't tell me about that.
No response
No response
No response
After adding the following lines to .zshrc
, I got:
plug:26: no such file or directory: /home/$USER/.local/share/zap/installed_plugins
plug:26: no such file or directory: /home/$USER/.local/share/zap/installed_plugins
plug:26: no such file or directory: /home/$USER/.local/share/zap/installed_plugins
plug:26: no such file or directory: /home/$USER/.local/share/zap/installed_plugins
plug:26: no such file or directory: /home/$USER/.local/share/zap/installed_plugins
The problem was fixed by commenting 50-52 in $ZAP_DIR/zap.zsh
.
zsh-history-substring-search trows this error
_history-substring-search-up-history:zle:13: widgets can only be called when ZLE is active
zsh-syntax-highlighting: error: $region_highlight is not defined
zsh-syntax-highlighting: (Check whether zsh-syntax-highlighting was installed according to the instructions.)
end of my config
[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"
plug "zsh-users/zsh-autosuggestions"
plug "zsh-users/zsh-syntax-highlighting"
plug "zsh-users/zsh-history-substring-search"
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
According to the instructions it should be loaded after syntax plugin which it is but it is not working the way it should.
Using the keybindings just goes up normally and highlight the part of text searched for example his
only when it comes in history.
see title
Many Zsh plugins expect themselves to be added to fpath
. One example of a plugin that won't work properly if it's not added to fpath
is the popular prompt plugin pure.
Other plugin managers do this for users automatically:
# zshrc
plug sindresorhus/pure
Error when not in fpath
:
prompt_pure_setup:22: async: function definition file not found
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
Zsh plugin managers should add loaded plugins to fpath
.
No response
All
All
Any
Any
None
No response
Hi there!
Currently zap
tends you to create repository for each plugin you need. It's OK for some kind of public plugins but when you develop your own config usually you want to put all plugins in one place. In this case it would be nice to have a command that allows to "bundle" all plugins from the repository. For example, I have a repo with files:
├ my-exa.plugin.zsh
├ my-vim.plugin.zsh
├ my-work-prompt.plugin.zsh
└ my-home-prompt.plugin.zsh
And somewhere in the .zshrc
I just simply write:
…
bundle "username/zap-config"
…
And all these plugins should be sourced.
Also (I'm not sure if we can do it in bash) additionally it would be nice to have an option that can skip one or more plugins from the repo. For example, in my current repo I have two plugins for prompt and for my home machine I want to use only my-home-prompt.plugin.zsh
by excluding my-work-prompt.plugin.zsh
like this:
# my home bash config
…
bundle "username/zap-config" -e my-work-prompt my-vim # also exclude my-vim
…
The reason because we should add "exclude" instead of some kind of white/black lists is that "Zap is a minimal zsh plugin manager" and we should expect the default behavior as it is without any complex side effects.
zap -v
using the one line in the README to install zap it doesn't works
zsh <(curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh)
copy
zsh <(curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh)
and paste in your zsh session
Install Zap
No response
ArchLinux, Any
any
v0.2.0 on commit 4928ff8
Any
None
Solved by PR #105
rupa/z
Popular cross-shell (POSIX) plugins like rupa/z work in Zsh, but it does not supply a .plugin.zsh
file, but instead has a .sh
file. Zap won't load it.
Support .sh
plugin files.
No response
PR incoming.
No response
Hey Guys. Just started to fool around with this. But the zap-prompt plugin isn't affecting my zsh prompt. Any ideas?
To raise the standard and keep things consistent auto formatting would be a good start.
as we know many of the plugins dont support the standard which zapplug
uses that is
Will only work with plugins that are named conventionally, this means that the plugin file is the same name as the repository with the following extensions:
.plugin.zsh
.zsh
.zsh-theme
so i think we should have a function that just clones the repos when given argument like <name of org or user>/<name of the repo>
and it just clones the repo
and then i think a fuction can update these plugins with the zapplug
plugins together with just a git pull
This is just a suggestion if you dont want to implement it its fine, it can be done manually just a builtin function would be nice
sed: 1: "/Users/xxx/.zshrc": invalid command code e
On MacOS Ventura 13.0.1, I got the above error during installation. This seems caused by the inconsistent versions of sed
in GNU and BSD.
Lines 18 to 19 in 8d3ca00
On the OSX version of sed, the -i option expects an extension argument ...
One potential solusion is to use sed -i.bak
, which works on both situations, but this will generate a .bak
backup file. Another potential solution is to use perl
instead of sed
.
I'm sorry that I have limited knowledge in shell programming. Not sure which solution is cleaner and more aligned with the style of Zap, so I'd love to hear your thoughts.
No response
Currently the entire repository is being pulled by plug, which is a lot of overhead if you just want to use it in a minimalistic fashion.
Make use of git clone --depth 1
to only clone the latest commit / checkout.
Cloned with plug
, then deleted the folders contents and recloned myself with git clone --depth 1
No response
No response
I know you said it was possible to install to $ZDOTDIR, but that's only to source the .zshrc if it's located there.
I want to be able to install the entire plugin manager to e.g. ${ZDOTDIR:-$HOME/.config/zsh}/zap
I don't want to have ZAP_DIR in $HOME/.local/share/zap
#36 breaks plugin update as it changes the structure of the plugins
folder, from plugins/<plugin_name>
to plugins/<user>/<plugin_name>
It also breaks the list of plugins to update, it shows the user instead of the plugin name.
Not sure which way should be chosen.
Typo in zap.zsh
It shouldn't be .zccompdump but .zcompdump
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.