Bookmark directories for easy directory-hopping in the terminal

Related tags

Command-line markd
Overview

Rust Crates.io Downloads License

markd

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.json file in the user home directory in the form of "name":"path", which can also be directly edited if necessary.

Shell Support

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.

Fish

  • Create a functions directory in fish config folder (usually /home/user/.config/fish)
  • Inside the folder, create a file named goto.fish
  • Copy and paste the following code and save it
      function goto
        cd $(markd g $argv)
      end
    

Zsh and Bash

  • Add the following code to your .zshrc or .bashrc
    goto() {
      cd $(markd g $1);
    }
    

Powershell (untested)

  • Open powershell and open your config file by running notepad $profile
  • Add the following code and save it
    function goto([string]$Bookmark) {
      cd (markd g $Bookmark)
    }
    

Install

  • Using cargo: cargo install markd, ensure $HOME/.cargo/bin is in path.
  • Pre-built binary: download the appropriate pre-built binary from the release section, place the binary in path.
You might also like...
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

dua (- Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory

dua (- Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory. It's parallel by default and will max

To help prevent directory traversal attacks

safe_join Use SafeJoin::safe_join in place of Path::join to help prevent directory traversal attacks. A call of the form dir.safe_join(path) returns a

Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past

Jumpy Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past. It is heavily inspired by Zoxide but is more lig

A simple command line program to upload file or directory to web3.storage with optional encryption and compression
A simple command line program to upload file or directory to web3.storage with optional encryption and compression

w3s-cli A simple command line program to upload file or directory to web3.storage with optional encryption and compression. Features Uploads single fi

Minimal recursive "truncate file/directory names to meet requirements" tool

trunc_filenames ssokolow@monolith ~ % trunc_filenames --help trunc_filenames 0.1.0 Rename files and directories to fit length limits. WARNING: Will n

Periodically download a youtube playlist, extract audio, convert to mp3, move to directory (possibly synced using syncthing).

auto-dl Periodically download a youtube playlist, extract audio, convert to mp3, move to directory (possibly synced using syncthing). drop https://git

A simple tool to clean all projects in a directory.

Cargo Cleanall A simple tool to clean all cargo projects in a directory. Help Cargo plugin to clean all cargo projects in a directory Usage: cargo cl

Rsre it's tool to rename file/directory

, Rust renamer Rsre it's tool to rename file/directory Zero dependencies đź‘€ Requirements Rust Nightly Install With Cargo # Install nightly rust rustup

Releases(v0.1.0)
Owner
Maaz Ahmed
Maaz Ahmed
Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

Guillem Jara 86 Dec 12, 2022
RnR is a command-line tool to securely rename multiple files and directories that supports regular expressions

RnR is a command-line tool to securely rename multiple files and directories that supports regular expressions. Features Batch rename files and direct

Ismael González Valverde 219 Dec 31, 2022
Find and clean heavy build or cache directories.

ProjClean Find and clean heavy build or cache directories. ProjClean finds directories such as node_modules(node), target(rust), build(java) and their

null 42 Sep 25, 2022
Tool for managing dotfiles directories; Heavily based on rcm.

Paro paro : to prepare, get ready / set, put / furnish, supply. Tool for managing dotfiles directories; Heavily based on rcm. TODO Rust Boilerplate CI

Rafael Delboni 7 Nov 20, 2022
Quickly find all blackhole directories with a huge amount of filesystem entries in a flat structure

findlargedir About Findlargedir is a tool specifically written to help quickly identify "black hole" directories on an any filesystem having more than

Dinko Korunic 24 Jan 1, 2023
Semi-persistent, scoped test directories

Semi-persistent, scoped test directories This crate aims to make it easier to use temporary directories in tests, primarily by calling the testdir!()

Floris Bruynooghe 4 Nov 19, 2022
Wraps cargo to move target directories to a central location [super experimental]

targo Wraps cargo to move target directories to a central location [super experimental] To use, cargo install --git https://github.com/sunshowers/targ

Rain 18 Jan 7, 2023
Temporary files and directories with UTF-8 paths.

camino-tempfile A secure, cross-platform, temporary file library for Rust with UTF-8 paths. This crate is a wrapper around tempfile that works with th

null 4 Apr 24, 2023
Utility to display a tree view of directories.

TreeCraft v0.2.3 (16 October 2023) TreeCraft is a command-line utility written in pure Rust that helps you visualize directory structures in ASCII for

Akmal 4 Oct 14, 2023
Remove files or directories.

Wrm - Remove files or directories Installation Run the following Cargo command: cargo install wrm Usage To move files to trash($HOME/.local/share/wrm

null 41 Mar 4, 2024