xonecas.io
5119
Lh

lazy-history / commit 1fa844b

feat: adds install shell script (wip)

Sean2025-05-12 1fa844b3836a0374e1859a598b9bc0baaa4b5186 parent 0cc75f5

3 files changed

README.md+6−1
@@ -6,5 +6,10 @@ Currently still in early development.
66
77 ## TODO:
88
9-- [ ] -> Actually execute the history entry selected (done in previous iteration, needs refactoring)
109 - [ ] -> Pinned/Favorite commands? Able to add/remove a command from the list to a favorites/pinned list
10+
11+## How to use:
12+
13+You can close the repo and run `scripts/install.sh`, this will use go install and ensure the go bin is in your path, as well as setting the keybind.
14+
15+As an alternate, you can also copy paste the relevant sections of install.sh.
main.go+0−0
scripts/install.sh+15−0
@@ -0,0 +1,15 @@
1+#! /bin/sh
2+
3+# set shell options to print commands as they are executed
4+set -xe
5+
6+# Install the lazy-history command using go install
7+go install github.com/sacenox/lazy-history@latest
8+
9+# Add the lazy-history command to the PATH if it's not already there
10+if ! echo "$PATH" | grep -q "$HOME/go/bin"; then
11+ export PATH="$PATH:$HOME/go/bin"
12+fi
13+
14+# bind the command to ctrl+r
15+bind -x '"\C-r": lazy-history'