Skip to main content

Save Bash history as snippets / history tooling

Project description

hbin

Save your Bash history as snippets!

hbin (or history-bin) is a CLI tool that allows you to save snippets of your Bash history. You can list, view, edit, delete, export, share, or run your saved history snippets at any time, using a simple command line interface (with zero external package deps). It works by viewing and slicing your history to extract specific lines you want to save as a snippet.

Install

pip install hbin

Usage

ℹ `hbin` command actions. NOTE: actions cannot be combined: 
----------------------------------------------------------
-r (refresh history) 
-n NUM (show last NUM lines of history - goes into buffer) 
       (no flag: equivalent to -n 100) 
-c LIST (snip history; eg 1,3,5-9 - goes into buffer) 
        (COMMA-SEP lines or ranges, ignores unmatched) 
-b (show what's in the buffer - from last -n or -c) 
-s NAME (save latest output - the buffer - as a snippet) 
        (saving overwrites on name without warning!) 
-k NUM (delete the saved snippet) 
       (deleting does so without warning!) 
-l (list saved snippets) 
-d NUM (display saved snippet) 
-e NUM (edit saved snippet) 
-x NUM (execute saved snippet) 
-p NUM (paste saved snippet to paste.rs) 
-f NUM (export saved snippet as a shell script file) 
-u [USER] (get or set username) 
-h (this help)

FAQ

Only Bash?

Yes, for now.

Can I get involved?

Yes, you can. Pick a fix or enhancement from Codeberg, fork the repo, and issue a pull request when ready.

Future features

  • Support for other shells / switch between shells (zsh, fish, csh, etc..)
  • Back-up / restore your snippets
  • Search history to find relevant lines
  • Multi-lingual

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hbin-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hbin-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file hbin-0.1.0.tar.gz.

File metadata

  • Download URL: hbin-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for hbin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a79b5339a8e874909b757508050bd50ed6395b296157fca690af0a4f8e882c04
MD5 8d17da258c141274ba7c8e14f433b55a
BLAKE2b-256 4d77d5af89e9dc105d112a187570c1f963c8e0ba70f6167385f80c96b520e4c8

See more details on using hashes here.

File details

Details for the file hbin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hbin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for hbin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 565e4c9b17d2df2b2f61aa99724a6591a3fa177f8c6324324560413790b6921a
MD5 b98ed0a9fa041d1138cb9d1f90be1330
BLAKE2b-256 b1ab529a41932795de828a2eb0c41c116a0102f14550059035f281324077ed7c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page