>_ZSH-LEARN
Turn your terminal into a persistent knowledge base. Save snippets, one-liners, notes. Search with filters, fzf fuzzy matching, or random sampling. Drill yourself with randomized quizzes for spaced recall. Edit in-place with $EDITOR. Backed by MySQL/MariaDB.
Install
# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-learn
# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-learn \
"$HOME/.oh-my-zsh/custom/plugins/zsh-learn"
# then: plugins+=(zsh-learn)
# Manual
git clone https://github.com/MenkeTechnologies/zsh-learn
source zsh-learn/zsh-learn.plugin.zsh
After install: zsh-learn-CreateLearningCollection generates the DDL and creates the table.
Configuration
ZPWR_LEARN_COMMAND | default mysql — database command to execute queries |
ZPWR_SCHEMA_NAME | default root — schema name for the learning table |
ZPWR_TABLE_NAME | default LearningCollection — table name for stored entries |
Command matrix
le LEARNING | insert a new entry |
editl ID | open entry by ID in $EDITOR |
del [N] / delid ID | delete last N (default 1) / delete by ID |
se [FILTER...] | search the learning column with optional filters |
see / seee | also show category / category + date |
sef | search all via fzf (most recent first) |
ser [N] / sera | N random (default 100) / all random |
qu [N] / qua | N random into fzf / all randomized into fzf |
re / rsql | print SQL update statements / open in vim |
Key bindings
^k (viins + vicmd) | zsh-learn-Learn — insert the current buffer as a learning entry |
Sibling plugins
Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella:
- zsh-better-npm-completion — cache-aware
npm installcompletion - zsh-cargo-completion — live
cargo add/cargo installcompletion - zsh-cpan-completion — live MetaCPAN
cpan/cpanmcompletion - zsh-dotnet-completion — dotnet CLI completion
- zsh-expand — spacebar expansion (11,683 tests)
- zsh-gem-completion — ruby
gem installremote completion - zsh-git-acp — 159 git aliases + add/commit/push keybindings
- zsh-git-repo-cache — index every git repo on disk
- zsh-more-completions — 33,175-file mega completion corpus
- zsh-nginx — nginx commands + service-wrapper aliases
- zsh-pip-description-completion — pip remote completion with descriptions
- zsh-sed-sub — in-place sed substitution on the command line
- zsh-sudo — ESC ESC to prepend sudo
- zsh-xcode-completions — xcodebuild / xcrun / swift completion