rcaloras/bash-preexec
View on GitHub ↗ ★ 1,061 Shell
⚡ preexec and precmd functions for Bash just like Zsh.
10 mentions on Hacker News by 9 people: 1 story, 9 comments · first 2015-09-08 · latest 2025-11-12
20082026
-
▲ 1
Preexec and precmd functions for Bash just like Zshstory by seansh · 2025-11-12 · 0 comments
-
I wonder if bash-preexec https://github.com/rcaloras/bash-preexec could be used here. Perhaps you could start a timer in a preexec, and stop it in precmd. If the elapsed time is greater than some value, notify-send yourself a message that…
comment by belden · 2025-02-26 · in Xonsh – A Python-powered shell -
…ps://gist.github.com/chmaynard/dbcaed11534dc54bdc90856d18... - Install .bash-preexec.sh in $HOME (see https://github.com/rcaloras/bash-preexec ). - Append this command to your shell startup file (e.g. $BASH_HOME/.bashrc): source…
comment by chmaynard · 2023-05-09 · in Atuin replaces your existing shell history with a SQLite database -
…use the excellent bash-preexec plugin that atuin itself relies on to achieve this in a cleaner way: https://github.com/rcaloras/bash-preexec
comment by brasic · 2023-05-06 · in Atuin replaces your existing shell history with a SQLite database -
…and it's otherwise easily greppable. When I was still using bash, I had this same thing using https://github.com/rcaloras/bash-preexec .
comment by misnome · 2022-10-13 · in Fixing macOS Zsh Terminal History Settings -
…part of this submission is the shell script dependency it uses to intercept every command you run: https://github.com/rcaloras/bash-preexec/blob/master/bash-pr... I don’t know rust, but the rust files in the submission look very…
comment by NavinF · 2022-07-31 · in Shellfirm: Intercept risky patterns at the command line -
…$$ $(date "+%Y-%m-%dT%H:%M:%S%z") $*" >> ~/.fullhistory It's attached to the preexec hook of https://github.com/rcaloras/bash-preexec , so is run before every command. This means that everything goes into one easily-greppable file, but is…
comment by misnome · 2021-01-29 · in What am I running inside my bash? (2014) -
…it can make my snippet even simpler? edit: Ah, IIUC, PS0 seems bash 4.4+, for better or worse: https://github.com/rcaloras/bash-preexec/issues/28
comment by akavel · 2020-04-19 · in When did I run that command? Update your Bash prompt with the command start time -
…as well as each command executed in bash. --- [0] https://github.com/onelittlehope/bash-prompt [1] https://github.com/rcaloras/bash-preexec
comment by jchoksi · 2016-05-31 · in How and Why to Log Your Bash History -
…even just before executing a command. I'm kind of nervous if my string quoting is safe though. [1] https://github.com/rcaloras/bash-preexec
comment by leni536 · 2015-09-08 · in “I have [bash] history back to ~2003”