All Projects → marlonrichert → Zsh Snap

marlonrichert / Zsh Snap

Licence: mit
⚡️ Znap! A fast & light-weight plugin manager & Git repo manager for Zsh.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Zsh Snap

Zsh Better Npm Completion
Better completion for npm
Stars: ✭ 346 (+253.06%)
Mutual labels:  zsh, zsh-plugin
Zsh Autocomplete
🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
Stars: ✭ 641 (+554.08%)
Mutual labels:  zsh, zsh-plugin
Fz
Cli shell plugin, the missing fuzzy tab completion feature of z jump around command.
Stars: ✭ 359 (+266.33%)
Mutual labels:  zsh, zsh-plugin
Zsh Apple Touchbar
Make your touchbar more powerful.
Stars: ✭ 261 (+166.33%)
Mutual labels:  zsh, zsh-plugin
Zui
⬢ Zsh User Interface library – CGI+DHTML-like rapid application development with Zsh
Stars: ✭ 95 (-3.06%)
Mutual labels:  zsh, zsh-plugin
History Search Multi Word
Multi-word, syntax highlighted history searching for Zsh
Stars: ✭ 314 (+220.41%)
Mutual labels:  zsh, zsh-plugin
Zsh Abbrev Alias
This zsh plugin provides functionality similar to Vim's abbreviation expansion.
Stars: ✭ 84 (-14.29%)
Mutual labels:  zsh, zsh-plugin
git-prompt.zsh
A fast, customizable, pure-shell, asynchronous Git prompt for Zsh
Stars: ✭ 139 (+41.84%)
Mutual labels:  zsh, zsh-plugin
Antigen
The plugin manager for zsh.
Stars: ✭ 6,843 (+6882.65%)
Mutual labels:  zsh, plugin-manager
Fzf Tab
Replace zsh's default completion selection menu with fzf!
Stars: ✭ 761 (+676.53%)
Mutual labels:  zsh, zsh-plugin
ranger-autojump
The combined magic of autojump, ranger and zsh
Stars: ✭ 59 (-39.8%)
Mutual labels:  zsh, zsh-plugin
Kube Aliases
Kubernetes Aliases and Bash Functions
Stars: ✭ 40 (-59.18%)
Mutual labels:  zsh, zsh-plugin
zsh-poetry
🐚 Simple ZSH plugin for automatically activating and deactivating Poetry-created virtualenvs. 🐍
Stars: ✭ 43 (-56.12%)
Mutual labels:  zsh, zsh-plugin
Dotbare
Manage dotfiles and any git directories interactively with fzf
Stars: ✭ 327 (+233.67%)
Mutual labels:  zsh, zsh-plugin
tipz
Gives you helpful hints when you execute a command for which you have an alias defined
Stars: ✭ 24 (-75.51%)
Mutual labels:  zsh, zsh-plugin
Zsh Z
Jump quickly to directories that you have visited "frecently." A native ZSH port of z.sh.
Stars: ✭ 562 (+473.47%)
Mutual labels:  zsh, zsh-plugin
aterminal
🎉 An oh-my-zsh plugin for show platform versions
Stars: ✭ 31 (-68.37%)
Mutual labels:  zsh, zsh-plugin
zhooks
Display Zsh hook functions and arrays
Stars: ✭ 36 (-63.27%)
Mutual labels:  zsh, zsh-plugin
Zsh You Should Use
📎 ZSH plugin that reminds you to use existing aliases for commands you just typed
Stars: ✭ 659 (+572.45%)
Mutual labels:  zsh, zsh-plugin
Pctl
zsh plugin for proxy
Stars: ✭ 6 (-93.88%)
Mutual labels:  zsh, zsh-plugin

⚡️Znap!

Znap is the light-weight Git repo manager & Zsh plugin manager that's easy to grok. While tailored to Zsh plugins specifically, Znap can help you manage any number of Git repos, without them needing to be plugins.

Features

Low resource usage

Only ~18 kilobytes of source code. Takes little disk space and little memory.

Zero configuration

git clone the repo into the right place, source the .zsh file, and you're good to go.

Instant prompt

Add znap prompt <theme name> to your .zshrc file to reduce your startup time to ~40ms (depending on your prompt theme).

Multi repo management

Do znap status to run git fetch and see an abbreviated git status for all your repos at once. Do znap pull to run git pull in all your repos. Use znap ignore <repo> <pattern> ... to add entries to your repo's local exclude list.

Additionally, each of your repo dirs can now be referred to with ~[<repo>]. So, instead of having to type the full path to each repo, you can now do, for example, ls ~[<repo>]/<subdir>... or cd ~[<repo>]/<subdir>.... And, of course, completions are available for these.

Parallel processing

When you do znap pull, updates for all of your repos are downloaded in parallel. Use znap multi <command> ... to run any number of tasks of any kind in parallel.

Easy re-install

Znap saves the URL of each remote you clone into ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/znap-repos. Should you ever "accidentally the whole thing", just do znap clone without arguments to quickly re-clone all repos in parallel.

Automatic compinit and bashcompinit

You no longer need to put compinit or bashcompinit in your .zshrc file. Znap will run these for you as needed.

Automatic completion cache invalidation

Znap automatically deletes and regenerates your comp dump file whenever you install or update a plugin or change your .zshrc file.

Command caching

Commands like eval "$(brew shellenv)", eval "$(pyenv init -)" and eval "$(pipenv --completion)" can be very slow to evaluate. If instead of eval "$( <command> )", you use znap eval <name> <command>, then the output of <command> will get cached, which can speed things up considerably. Plus, if <name> is a repo, then <command> will conveniently be evaluated inside it.

There are three cases that will cause znap eval to regenerate a cache:

  • If <name> is a repo and the repo's Git index is newer than the cache.
  • If the last argument to znap eval has changed. Thus, if <command> includes a variable, then its cached output will be regenerated whenever the variable changes. See the end of the example .zshrc file below for a practical use of this.
  • If the cache is missing. Thus, you can use znap rm <name>.zsh to force znap eval to regenerate the <name> cache.

Asynchronous compilation

While you are using Zsh, Znap compiles your scripts and functions in the background, when the Zsh Line Editor is idle. This way, your shell will start up even faster next time!

Should you not want this feature, you can disable it with zstyle ':znap:*' auto-compile no. Or if you want to exclude specific files only, you can do so by passing them as absolute-path patterns to the auto-compile-ignore setting. For example: zstyle ':znap:*' auto-compile-ignore "${ZDOTDIR:-$HOME}/.z*" '**/.editorconfig' '**.md'.

In any case, you can compile sources manually at any time with znap compile.

Requirements

Recommended:

  • Tested to work with Zsh 5.7 or newer.

Minimum:

  • Should theoretically work with Zsh 5.3, but I'm unable to test that. Definitely won't work with anything older.

Installation

  1. cd to the dir where your (want to) keep your Git repos. If you don't have one yet, you'll need to make one:
    % mkdir -pm 0700 ~/git
    % cd ~/git
    
  2. In there, git clone this repo:
    % git clone --depth 1 https://github.com/marlonrichert/zsh-snap.git
    
    • (optional) By default, Znap clones all plugins into its parent directory (~/git, if you followed the first step). If you want to install them elsewhere, you can configure the plugins directory by adding this to your .zshrc file (before the following step):
      zstyle ':znap:*' plugins-dir ~/.local/share/znap
      
  3. Add this line at the start of your .zshrc file (or at least before you make any calls to znap):
    source ~/git/zsh-snap/znap.zsh
    
  4. Restart your shell.

Author

© 2020 Marlon Richert

License

This project is licensed under the MIT License. See the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].