Skip to content

pleme-io/estante-stdlib

Repository files navigation

estante-stdlib

Five batteries every shell user reaches for. Frost-lisp + vanilla shell (bash + zsh). Frost-free out of the box.

Battery Surface What it gives you
prelude log/info/warn/error/die, need_command/need_env/is_command + .../..../h/j/path aliases Structured stderr logging, assertion helpers, common cd shortcuts
fs mkcd, real, expand, biggest, age + md/rd/cp/mv aliases The file/path helpers every shell user ends up writing
git 22 aliases (g, gst, gco, gpu, gpl, etc.) + git_current_branch/git_dirty/git_ahead_behind/gwip/gunwip Most popular shell config category, condensed
prompt Segment-based PS1 with user@host / cwd / git branch+dirty / exit status / time One-line precmd-driven prompt — override individual segments by redefining _prompt_*
modern-unix ll/la/lt via eza, vcat via bat, rgi/fdi/du1/df1 via ripgrep/fd/dust/duf Opt-in upgrades — falls back to coreutils when the modern tool is absent

Install

Via estante (frost or vanilla, your choice)

estante add github:pleme-io/estante-stdlib@v0.1.0
estante lock && estante install

Then in your ~/.frostrc.lisp:

(defsource :path "./shellpkg.lock.lisp")
(defload   :pkg "estante-stdlib")               ; whole stdlib
;; or one battery only:
(defload   :pkg "estante-stdlib" :entrypoint "git.lisp")

Vanilla bash / zsh

The same install gives you init.bash / init.zsh at the materialized path. Source either one:

# bash
. "$(estante info --print-store)/store/estante-stdlib/init.bash"

# zsh
. "$(estante info --print-store)/store/estante-stdlib/init.zsh"

Both files are idempotent — re-sourcing is a no-op. No frost, no estante runtime; just POSIX shell.

Per-battery composition

Every battery's helpers live in their own <name>.lisp (frost) / <name>.bash (vanilla) / <name>.zsh. Load just the one you want via :entrypoint (frost) or by sourcing a single battery file (vanilla):

. "$(estante info --print-store)/store/estante-stdlib/prelude.lisp"   # frost
. "$STORE/store/estante-stdlib/init.bash"                              # vanilla, all batteries

Override an aliased command

Aliases follow the last-writer-wins rule. To override a stdlib alias in your own rc:

# init.bash sources estante-stdlib first; your override after wins.
. "$STORE/store/estante-stdlib/init.bash"
alias ll='eza -1 --icons'

For frost, the same applies via (defalias :name "ll" :value "…") in your rc.lisp after the (defload …).

Design notes

  • No inter-battery deps. Each battery is sourceable in isolation; cross-references (e.g. prompt → git) are guarded by command -v checks so a frost-free prelude-only install still works.
  • Vanilla parity. Every .lisp form has a sibling .bash / .zsh implementation. The semantics match; the syntax differs.
  • Modern-unix is fail-soft. Aliases fall back to coreutils when the modern tool isn't installed. No "missing command" errors on rc-source.
  • MIT-licensed. Pick + remix.

License

MIT.

About

Estante shell-package stdlib — eight frost-and-vanilla compatible batteries: prelude / fs / git / prompt / modern-unix / fp / types / test. Frost-free out of the box: every battery sources from POSIX bash/zsh. The test battery ships an RSpec-style describe/it/expect framework with 14 matchers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors