Ross ROSS = Recommend OSS · open-source software intelligence for agents

rcaloras/bash-preexec

⚡ preexec and precmd functions for Bash just like Zsh. observed · 2026-08-28

github.com/rcaloras/bash-preexec · Shell · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

88/100

  • Activity 99
  • Release rhythm 67
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 385
  • age_days: 4292
  • days_rel: 10
  • days_push: 10
  • n_releases_24m: 2

Full methodology

Adoption not part of the score

1061 stars · 104 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A single-file shell library that brings Zsh-style preexec and precmd hook functions to Bash 3.1+. It lets scripts and tools run code just before command execution and just before each prompt, with support for hook function arrays.

Use cases

  • run a hook before each bash command executes
  • replace PROMPT_COMMAND with something more reliable
  • track command execution time in bash
  • integrate shell history tools like Atuin with bash
  • build custom bash prompt logic
  • capture the typed command for logging or syncing

When to choose

  • you need Zsh-style preexec/precmd hooks in Bash
  • you're building a shell integration for a terminal or history tool that must support Bash
  • PROMPT_COMMAND is too fragile for your prompt or hook needs

When to avoid

  • you're using Zsh, fish, or another shell with native hooks
  • you only need simple prompt customization without hooks
  • you need hooks in a non-Bash POSIX shell like dash

Facets

library · maturity stable

developer-tools cli middleware developer-tools command-line cli cross-platform bash shell-hooks preexec precmd zsh-style prompt-command terminal command-line linux macos

1 source

Member repositories

RepositoryRoleHealth v2
rcaloras/bash-preexecmain88

For agents

markdown · JSON · MCP: product_card(name="rcaloras/bash-preexec")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem