supercharge your fish shell history
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
extras
fish
src
tmp
.gitignore
Makefile
README.md
shard.lock
shard.yml

README.md

Polygon

(Save your shell history in an sqlite database)

Features:

  • For every interactive command entered in the shell, logs the start_date, duration, exit status and command into a database.
  • for every new shell session, will save the $USER, $HOME, $PATH, $SSH_CONNECTION, hostname, and utc offset (in seconds).
  • if the proper binaries exist, will log the physical location of each command too! Geolocate your commands
  • Daily backups of the history database
  • TODO: commandline tool for querying your history
  • TODO: integration into history query
  • TODO: merge databases from different systems

Limitations:

  • only works with fish shell for now. (2.7 or higher).

IDEAS for stats

  • most used command
  • most active PWD? per day? per day of week?
  • most blundered command (check if exit status != 0, aggregat)
  • commands that never terminate (exit is one, probably webpack, ctrl-c)
  • first command of the day, last command of the day, (times start, times end of day?)
  • command histogram over time
  • error/typo histogram over time
  • where do i issue the most commands (requires location)

TODOS

  • unit tests
  • merge history files from multiple hosts
  • cross compilation

How to build:

git clone ...
cd ...
shards
make
make install

The binary will be in bin/