LinuxCommandLibrary

bd

Browse directories using a symbolic link

TLDR

Initialize a project database

$ bd init
copy

Create a new issue with description, priority, and type
$ bd create [issue_title] [[-d|--description]] [description] [[-p|--priority]] [1] [[-t|--type]] [bug|feature|task|epic|chore]
copy

List all issues
$ bd list
copy

Show issues ready to work on (no blockers)
$ bd ready
copy

Display details of a specific issue
$ bd show [issue_id]
copy

Update an issue status
$ bd update [issue_id] [[-s|--status]] [open|in_progress|blocked|closed]
copy

Manually sync changes and import latest from git
$ bd sync
copy

Display help
$ bd [[-h|--help]]
copy

SYNOPSIS

bd [OPTION]... PATTERN

PARAMETERS

-h, --help
    display this help and exit

-i, --insensitive
    case insensitive pattern match (default)

-l, --list
    list paths only, do not change directory

-s, --subdir
    include sub-directories in search

DESCRIPTION

The bd command is a lightweight bash utility for rapid directory navigation. Instead of typing full paths with cd, you enter a substring of the target directory's path, and bd searches your home directory tree to find matches.

For example, typing bd doc might list and switch to ~/Documents, ~/public_html/doc, or similar. Matches are displayed with numbers, sorted by path depth (shallowest first). Press Enter for the top match or type a number to select another.

It leverages find for efficient searching via -path patterns. By default, searches are case-insensitive and exclude subdirectories for speed, but options allow customization. Ideal for users tired of cd ../../.. or incomplete tab completion on long paths.

bd integrates seamlessly into bash (and zsh with tweaks), often aliased or added to shell init. It's faster than full tree scans on typical setups but may lag on massive directory structures.

CAVEATS

Searches on-the-fly with find, potentially slow on systems with millions of files/directories. Limited to paths under $HOME by default; not a core utility, requires installation.

INSTALLATION

Download from https://github.com/supercrabtree/bd, make executable: git clone ... && chmod +x bd && sudo cp bd /usr/local/bin/. Add to .bashrc or use package managers like AUR/Homebrew.

USAGE TIP

Enable with alias bd='nocorrect bd' in zsh to avoid autocorrect interference. Combine with fzf for interactive previews via wrappers.

HISTORY

Created by Daniel Crabtree in 2014 as bd (bash directory), hosted on GitHub at supercrabtree/bd. Gained popularity as a simple, dependency-free alternative to indexed jumpers like autojump or z.sh. Maintained sporadically with bash/zsh/fish ports.

SEE ALSO

cd(1), pushd(1), find(1), autojump(1), zoxide(1)

Copied to clipboard