shellfirm
bash-preexec
Our great sponsors
shellfirm | bash-preexec | |
---|---|---|
21 | 8 | |
723 | 820 | |
- | - | |
5.7 | 5.0 | |
4 months ago | about 1 month ago | |
Rust | Shell | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
shellfirm
bash-preexec
-
Atuin replaces your existing shell history with a SQLite database
Or use the excellent bash-preexec plugin that atuin itself relies on to achieve this in a cleaner way: https://github.com/rcaloras/bash-preexec
-
How to log bash commands in some simple way?
Use this: https://github.com/rcaloras/bash-preexec/
-
Opppppsss you did it again
Funny you say that when the sketchiest part of this submission is the shell script 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 this repo look very straightforward. (Why wouldn’t it? It’s just matching a few hardcoded commands. It’d be easy in any language)
-
How Warp Works
Thankfully, most shells provide hooks for before the prompt is rendered (zsh calls this precmd) and before a command is executed (preexec). Zsh and Fish have built in support for these hooks. Though bash does not have built in support for these hooks, scripts like bash-preexec exist to mimic the behavior of other shells. Using these hooks, we send a custom DCS (Device Control String) from the running session to Warp. This DCS contains an encoded JSON string that includes metadata about the session that we want to render. Within Warp we can parse the DCS, deserialize the JSON, and create a new block within our data model.
-
What am I running inside my bash? (2014)
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 still separable by PID/host machine - since my work has me walking around a large facility, often I'll remember where I was when I did something but not exactly when, so can narrow down by machine.
What are some alternatives?
alacritty - A cross-platform, OpenGL terminal emulator.
trash-d - A near drop-in replacement for rm that uses the trash bin. Written in D
inquire - A Rust library for building interactive prompts
cr4sh_ - cr4sh_ (pronounced crash, because it crashes all the time) is a Linux shell fully written with Rust. This can be used for educational purposes and is a great intro to Systems Programming
goldboot - Immutable infrastructure for the desktop!
LLMShellAutoComplete - Use GPT to complete shell command line using atuin shell history database and terminal screen content as prompt
Warp - Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
zsh-merge-hist
tlog - Terminal I/O logger
resh - RESH ❯❯ Contextual shell history for zsh and bash
snoopy - Snoopy Command Logger is a small library that logs all program executions on your Linux/BSD system.