Crates.io | markd |
lib.rs | markd |
version | 0.2.1 |
source | src |
created_at | 2023-07-08 13:25:43.590141 |
updated_at | 2023-10-28 07:12:39.37984 |
description | Bookmark directories for easy directory-hopping in the terminal |
homepage | |
repository | https://github.com/voltaireNoir/markd |
max_upload_size | |
id | 911467 |
size | 33,793 |
Bookmark directories for easy directory-hopping in the terminal.
All it takes is one command markd
to bookmark your current directory, or use the -p / --path
to specify custom path and -a / --alias
to set a custom bookmark name. The CLI tool also provides the necessary functionality to search and clean your bookmarks. For example, the purge
command will check all the paths and remove the ones that no longer exist, and the list
command supports --filter
, --start
and --end
for advanced searching.
All paths are ensured to be valid ones, relative paths are stored in their expanded forms and names are always lowercase. No duplicate names are allowed (use an alias instead).
Run markd help
for a full list of supported commands and arguments. Run markd <COMMAND> --help
to get more info on the command.
Note: bookmarks are stored in
bookmarks.toml
file in the user home directory in the form ofname = "path"
, which can also be directly edited if necessary.
Since 'cd' is a built-in shell command, you need to use 'command substitution' to make use of markd to switch directories.
To make it work, simply add a function definition to your shell config file. After adding the necessary code to your shell config, you should be able to jump between directories using the command goto <bookmark-name>
.
Note: The function name used here is 'goto' but you can change it to whatever you prefer. The following shell functions can also be generated to stdout by running the command
markd shell <shell_name>
functions
directory in fish config folder (usually /home/user/.config/fish
)goto.fish
function goto
cd $(markd g $argv)
end
.zshrc
or .bashrc
goto() {
cd $(markd g $1);
}
notepad $profile
function goto([string]$Bookmark) {
cd (markd g $Bookmark)
}
cargo install markd
, ensure $HOME/.cargo/bin
is in path.