qd
is a lightweight and straightforward CLI tool to manage directory aliases. With qd
, you can save frequently used directories as aliases and quickly navigate to them from your terminal.
Clone the repository:
git clone https://github.com/enisbt/qd.git
cd qd
Build the binary:
go build -o qd
Move the binary to a directory in your $PATH:
sudo mv qd /usr/local/bin
Add the shell function for persistent navigation. Add the following to your ~/.bashrc or ~/.zshrc:
function qd() {
if [[ $1 == "save" ]]; then
/usr/local/bin/qd save "$2"
elif [[ $1 == "list" ]]; then
/usr/local/bin/qd list
elif [[ $1 == "delete" ]]; then
/usr/local/bin/qd delete "$2"
else
cd "$(/usr/local/bin/qd "$1")"
fi
}
Reload your shell configuration
source ~/.bashrc # or `source ~/.zshrc`
Save current directory as an alias
qd save <alias>
Navigate to a saved alias
qd <alias>
List all aliases
qd list
Delete alias
qd delete <alias>
Distributed under the MIT License. See LICENSE
for more information.