A bookmarker for your terminal.
Run go install github.com/henrikac/bookmark@latest
.
$ bookmark add speak echo "hello world"
This will bookmark speak
with the command echo hello world
.
Notes:
- if you want to use quotes you need to escape them.
- if your command contains flags e.g.
-h
you need to add--
between the bookmark name and the command
$ bookmark add ls -- ls -al
- if your command contains e.g.
|
or>
you need to wrap the entire command in quotes
$ bookmark add hello "echo \"Hello world\" > /some/path/hello.txt"
$ bookmark list
Lists all your saved bookmarks.
$ bookmark search <bookmark>
Search for a specific <bookmark>
and return the command if it exists.
$ bookmark exec <bookmark>
This will execute the command saved in <bookmark>
.
$ bookmark remove <bookmark>
This will remove <bookmark>
if it exists.
$ bookmark config list
THis will list all the configurations.
$ bookmark config set storePath ~/.config/bookmark/
This will set the storePath
to ~/.config/bookmark/bookmarks.json
.
If the last part of the given path is a folder like in the example above then it MUST end with a /
.