Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lollipopkit/shtg
Tidy & Sync your shell (zsh / fish) histories.
https://github.com/lollipopkit/shtg
fish shell tools zsh
Last synced: 23 days ago
JSON representation
Tidy & Sync your shell (zsh / fish) histories.
- Host: GitHub
- URL: https://github.com/lollipopkit/shtg
- Owner: lollipopkit
- Created: 2023-04-12T12:16:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-14T15:27:54.000Z (6 months ago)
- Last Synced: 2024-12-07T02:41:57.286Z (about 1 month ago)
- Topics: fish, shell, tools, zsh
- Language: Go
- Homepage:
- Size: 41 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Shell History Tool
### Features
- [x] Support zsh / fish
- [x] Sync history between multiple shells
- [x] Tidy history using `duplicate` / `regexp` / `duration` / `last`### Usage
Common usage:
```bash
# remove duplicate history
shtg dup
shtg d
# rm previous cmd
shtg previous
shtg p
# remove history with regexp pattern
shtg re 'pattern'
# remove history with duration
shtg recent 7h # 7 hours
shtg r 3d # 3 days
# remove last N history (include itself)
shtg last 10
shtg l 3
# you can specify the shell
shtg -t zsh dup
# or dry-run
shtg -d dup
```Details:
```
> shtg
NAME:
shtg - Shell History Tool written in GoUSAGE:
shtg [global options] command [command options] [arguments...]COMMANDS:
dup, d Remove duplicate history
re Remove history which match regex
recent, r Remove history in duration
previous, p Remove previous cmd
last, l Remove last N cmd
sync, s Sync history between zsh / fish
restore, rs Restore history from previous backup
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--shell value, -s value fish / zsh
--dry, -d without write to file (default: false)
--help, -h show help
```