https://github.com/beoliver/husk
https://github.com/beoliver/husk
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/beoliver/husk
- Owner: beoliver
- Created: 2020-09-29T19:24:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-22T20:39:59.000Z (about 3 years ago)
- Last Synced: 2025-06-30T03:03:41.464Z (7 months ago)
- Language: Shell
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# husk
## What?
### Add a comment to your last command.
Updates your `~/.zsh_history` file to include the last command run with an appened comment.
### Example
```sh
$ some-command --with -f -l ags
$ husk "some context about the command"
$ ls -la
$ history | tail -n 4
10136 some-command --with -f -l ags
10137 ./husk.sh "some context about the command"
10138* some-command --with -f -l ags #HUSK# some context about the command
10139 ls -la
```
## Why?
Because sometimes a command is _meaningful_, but not _memorable_. Being able to search for some additional text (keywords, tags, etc) makes findning the command in your history easier.
## Setup
```sh
echo "alias husk=~HOME/path/to/husk.sh" >> ~/.zshrc
```
This menas that you can use `bck-i-search` to search for the comment that you left. the command can still be run.
Can be combined with `fzf` - for example:
```sh
history | fzf --height 40%
```
## Caveats
- Only support for `zsh`.
- Does not support multi line commands