Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qcd

qcd means quick cd (quick change directory).

It is a small zsh bookmark manager for directories.

                        █████
                       ░░███
  ████████  ██████   ███████
 ███░░███  ███░░███ ███░░███
░███ ░███ ░███ ░░░ ░███ ░███
░███ ░███ ░███  ███░███ ░███
░░███████ ░░██████ ░░████████
 ░░░░░███  ░░░░░░   ░░░░░░░░
     ░███
     █████
    ░░░░░

Features

  • qcd add: add a directory bookmark
  • qcd add . [alias]: bookmark the current directory, optionally naming it inline
  • qcd <alias>: jump to a saved directory
  • qcd list: list all bookmarks in aligned columns
  • qcd rename <oldalias> <newalias>: rename an existing alias
  • qcd remove <alias>: remove a bookmark
  • qcd help: show usage
  • Persistent storage in ~/.qcd_bookmarks.zsh

Requirements

  • zsh
  • macOS/Linux shell environment

Install

Both install paths use install.zsh, which safely updates ~/.zshrc (newline-safe, no duplicate source line) and loads qcd immediately.

Homebrew (recommended)

brew tap adamzafir/qcd https://github.com/adamzafir/qcd
brew install qcd
source "$(brew --prefix)/share/qcd/install.zsh"

Manual

git clone https://github.com/adamzafir/qcd.git ~/.qcd
source ~/.qcd/install.zsh

Usage

Add a bookmark

qcd add
# add the path: ~/Desktop/Programming
# add the alias: prog

Add current directory quickly

qcd add .
# add the alias: here

Add current directory in one line

qcd add . here

Jump to a bookmark

qcd prog

List bookmarks

qcd list

Remove a bookmark

qcd remove prog

Rename a bookmark alias

qcd rename prog work

Help

qcd help

Notes

  • Alias format is validated as: [A-Za-z0-9._-]+
  • Relative paths and ~ are expanded to absolute paths
  • If an alias already exists, qcd add overwrites it
  • Legacy malformed aliases (from older buggy versions) are normalized automatically when loaded

Storage

By default bookmarks are stored in:

~/.qcd_bookmarks.zsh

You can override this location:

export QCD_STORE="$HOME/.my_qcd_bookmarks.zsh"

Uninstall

  1. Remove the source line from ~/.zshrc
  2. Delete the repo folder
  3. Optionally remove ~/.qcd_bookmarks.zsh

License

MIT

About

zsh bookmark manager for directories.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages