Skip to content

mollifier/zload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, 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 file

When -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

About

zsh plugin to load files as an autoloading function

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages