Crates.io | bookmark-cli |
lib.rs | bookmark-cli |
version | 1.2.0 |
source | src |
created_at | 2024-09-22 13:29:01.706619 |
updated_at | 2024-11-24 12:08:50.74248 |
description | Simple bookmark tool |
homepage | |
repository | https://github.com/iced-penguin/bookmark-cli |
max_upload_size | |
id | 1382973 |
size | 48,469 |
A command-line tool for managing bookmarks of directories.
This tool aims to allow users to save paths to specific directories as bookmarks, making it easy to access them later. Users can add, search, list, and delete bookmarks.
Bookmarks are stored in a hidden file (~/.bookmarks
).
rustc
and cargo
cargo install bookmark-cli
Command | Description |
---|---|
add | Add a bookmark |
delete | Delete a bookmark |
search | Search for a bookmark |
list | List bookmarks |
prune | Delete all broken bookmarks |
help | Print this message or the help of the given subcommand(s) |
bm add [bookmark path] [--tags tag1,tag2,...]
The bookmark path must be an absolute path.
If you do not specify [bookmark path]
, the current directory will be registered as a bookmark.
You can also add tags to the bookmark using the --tags
option. Tags should be comma-separated.
bm search
A search prompt will appear, allowing you to filter and select a bookmark.
bm list
All bookmarks will be displayed.
bm delete
A prompt will appear for you to select the bookmark you want to delete.
bm prune
All broken bookmarks, i.e. bookmarks that no longer exist, will be deleted.
You can move to a selected bookmark by combining it with the cd
command.
If you are using zsh, you can add a function to your ~/.zshrc
.
For example:
function cb() {
local -r dir=$(bm search)
if [ -z "$dir" ]; then
return 1
fi
cd "$dir" || return 1
}