Skip to content

brettviren/shist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

SHIST: a less advanced shell history

Store and query bash history in an sqlite3 database following Advanced Shell History schema using only bash and sqlite3 (and fzf).

Install

$ source shist.sh

Usage

$ shist-<TAB>
$ shist-cwd
25|2019-06-01 07:44:01|cd shist/|0|0
25|2019-06-01 07:51:21|less shist.sh|0|49
$ shist-here
(fzf opens)

Customization

  • Set location of SHIST_DB at top.
  • Write new or modify existing shist-* query+format functions.

Integrate with vcsh

Do you use vcsh? Of course you do. Wanna add shist to your setup but keep connection to this repo? Who wouldn’t? Assuming $HOME/.bash/ is already under vcsh control as module “bash”, one might do something like:

$ mkdir ~/.bash/subrees
$ vcsh bash remote add shist https://github.com/brettviren/shist.git
$ vcsh bash fetch shist
$ vcsh bash subtree add -P .bash/subtrees/shist -m "shist subtree" shist/master
(hack)
$ vcsh bash subtree push -P .bash/subtrees/shist shist master

Then:

source $HOME/.bash/subtrees/shist/shist.sh

About

Shell history and query using SQLite3 and following advanced-shell-history table schema

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages