Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romanthekat/topper-go
This little tool parses your .bash_history file, and calculates the most frequent commands.
https://github.com/romanthekat/topper-go
bash command-line-tool golang
Last synced: 14 days ago
JSON representation
This little tool parses your .bash_history file, and calculates the most frequent commands.
- Host: GitHub
- URL: https://github.com/romanthekat/topper-go
- Owner: romanthekat
- License: apache-2.0
- Created: 2017-05-21T11:38:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-01T15:19:50.000Z (over 2 years ago)
- Last Synced: 2024-06-19T22:36:53.962Z (5 months ago)
- Topics: bash, command-line-tool, golang
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# topper-go
This little tool parses your `.bash_history` file, and calculates the most frequent commands.## How to build
* with makefile:`make build` will produce topper-go executable file
`make build.mac` or `make build.linux`
* with go command
`go build -o topper-go main.go`
or
`go build -o tg main.go`
that will produce `topper-go` or `tg` executable file.
## How to use
`tg` - to show top 10 commands
`tg 5` - to show top 5 commands
with output format:
```
155: ping ya.ru (x26)
21: ./launch.sh (x26)
39: ls (x16)
94: git pull origin (x13)
228: git status (x10)
309: psql (x7)
...
```Where for `155: ping ya.ru (x26)`:
- `155` - command number in terms of bash, e.g. `!155` allows to repeat command execution
- `ping ya.ru` - command itself
- `(x26)` - current execution count