Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mollifier/zload
zsh plugin to load files as an autoloading function
https://github.com/mollifier/zload
Last synced: about 2 months ago
JSON representation
zsh plugin to load files as an autoloading function
- Host: GitHub
- URL: https://github.com/mollifier/zload
- Owner: mollifier
- License: mit
- Created: 2014-03-29T23:59:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-24T11:31:12.000Z (about 9 years ago)
- Last Synced: 2024-01-25T17:35:22.124Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 199 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zsh-plugins - zload - Hot Reload for ZSH functions. Enables rapid development. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - zload - Hot Reload for ZSH functions. Enables rapid development. (Plugins / ZSH on Windows)
README
# zload
## Synopsis
zsh plugin to load functions as an autoloading function.## How to set up
### Manually install
Put zload and _zload files somewhere in your $fpath and add the following line to your .zshrc:
```
autoload -Uz zload
```#### For example
```
# download all files
% cd /path/to/dir
% git clone https://github.com/mollifier/zload.git
```And add the following lines to your .zshrc:
```
fpath=(/path/to/dir/zload(N-/) $fpath)autoload -Uz zload
```### Installing using Antigen
If you use [Antigen](https://github.com/zsh-users/antigen), add the following line to your .zshrc:```
antigen bundle mollifier/zload
```## Usage
```
% zload [-a|-d] FILE...
```Load FILEs as an autoloading function.
zload can load autoloading function or zsh completion files as input fileWhen -a option is specified, from then on come to reload functions automatically. -d option stops this feature.
## Options
* `-a` enable auto reload
* `-d` disable auto reload
* `-h` display help and exit## Examples
```
# Load myfunc and _myfunc.
% zload myfunc _myfunc# Now we can call myfunc even if it isn't in fpath.
% myfunc# Load myfunc again and enable auto reload.
% zload -a myfunc# edit myfunc
# ...
# Changes are applied immediately if auto reload is enabled.
% myfunc# Disable auto reload.
% zload -d# Enable auto reload.
% zload -a
```