shist
A small TUI for picking commands out of your shell history and copying them to the clipboard. Targets bash primarily; zsh is supported the same way.
How it works
- In bash/zsh, after sourcing the shell integration (recommended):
shistis a shell function that pipes your shell's ownhistorybuiltin into the tool. That's the live, in-memory history of the current session, including anything you typed that hasn't been flushed to a history file yet. - Standalone (no shell integration, or in a shell without a
historybuiltin): runningshistdirectly reads a history file instead —--file PATH, or$HISTFILE, or~/.bash_history/~/.zsh_historydepending on--shell/$SHELL. This can miss very recent commands the live shell hasn't written to disk yet.
Install
pip install shist
Then add the shell integration to your .bashrc and/or .zshrc:
eval "$(shist --print-shell-init)"
Open a new shell (or source your rc file) and run shist.
Using it
There are three panels; Tab cycles through them: search → history
→ selection → back to search. This keeps typing fully separate from
the single-key list commands — c, d, -, [, ] are always literal
query text while you're in the search panel, and only act as commands once
you've tabbed into history or selection.
Search (active on start):
- Type to filter (fuzzy substring match);
Backspaceedits it. ↑/↓(Ctrl+P/Ctrl+N) still browse the history list live;Shift+↑/Shift+↓page through it.Tabmoves to the history panel.
History panel (browse & add):
↑/↓move the highlight, not wrapping past either end;Shift+↑/Shift+↓move a page at a time.cadds the highlighted command to the selection, at the end.Tabmoves to the selection panel.
Selection panel (the running list of what you've added, in order):
↑/↓move the highlight, not wrapping past either end;Shift+↑/Shift+↓move a page at a time.dor-removes the highlighted entry.[/]move the highlighted entry earlier/later.Tabmoves back to search.
Any panel:
Enterconfirms: copies the selection, newline-joined in order; with nothing added, copies just the highlighted history entry.Esc/Ctrl+Ccancels without copying anything.
Known limitations
- A custom
HISTTIMEFORMATin bash gets treated as part of the command text when reading pipedhistoryoutput — not specially parsed out. - Plain POSIX
sh/dashhas nohistorybuiltin, so there's no live-history mode for it; only the standalone/file-fallback mode applies.
Metadata
Release files for shist 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| shist-0.1.2.tar.gz | 15.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shist-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.4 kB
Release files / shist-0.1.2.tar.gz
| Download URL | shist-0.1.2.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6e5d94032de972feaee113e3f8597753974e44ae22b27c57944a0078c5d1b36
|
|
BLAKE2b-256 checksum How to use checksums |
e929fb9957fd9e1351716b123e279920d3b0b62a2bae371881ea17ffb37cadf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logRelease files / shist-0.1.2-py3-none-any.whl
| Download URL | shist-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec11f930dcb8a3a59a62cf8395b8c64f1ac0d4dc437a588fa0dc6312f05d7cc6
|
|
BLAKE2b-256 checksum How to use checksums |
df573365e182d54f4dd498452815951965ff4f71943e3ccf3c161528d7d8d161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logSecurity for shist 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for shist-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.