Home

Awesome

zsh-smartcache

A Zsh plugin to cache command output to boost shell startup.

What it does

It basically has the same functionality as evalcache, except that

Benchmark

Here are some benchmark results. (CPU: Ryzen 3700X)

Benchmarked by hyperfine 'zsh -ic exit' and comparing the differences.

commandversionraw evalzsh-smartcacheevalcache
rbenv init1.2.0~48ms~23.5ms~23.5ms
hub alias2.14.2~2.5ms~1.5ms~1.5ms
scmpuff init0.5.0~2.5ms~2ms~2ms

Some changes from evalcache's results:

Usage

Eval

eval "$(rbenv init -)"
# change to
smartcache eval rbenv init -

Completion

rustup completions zsh > ~/.zfunc/_rustup
fpath+=~/.zfunc
# change to
smartcache comp rustup completions zsh

Configuration