I am lazy and turns out that basic tab completion wasn't enough for me to navigate through my directories using cd
Hence I made cdd. This tool helps me create aliases to location which I can jump to at anytime from anywhere.
There is also a cdo command that has the same fuctionality like cdd but will open the required path in the file manager rather than in the terminal.
And the best part is that cdd also has the basic functionality of cd.
- Clone the repo. Open a terminal at the cloned path.
. ./dist/install.sh
That detects your OS and CPU and runs the matching installer. Prebuilt binaries are in dist/:
| Target | Directory | Shell |
|---|---|---|
| macOS Apple Silicon (M1 and later) | dist/mac-arm64 |
zsh |
| macOS Intel | dist/mac-intel |
zsh |
| Linux x86-64 | dist/linux-amd64 |
bash |
To pick one yourself, cd into its directory and run . ./install.sh. Everything installs into ~/bin/cdd and adds aliases to your ~/.zshrc or ~/.bashrc.
For any other platform, build the binary from gcdd/ with go build and copy it into one of the bin/ directories before installing.
You can use the -h to get info about the commands that you have, but here's the gist of it
# Add an alias
cdd add <alias_name> <target/relative_destination> [flags]
# Delete an alias
cdd delete <alias_name> [flags]
# List all aliases
cdd -l
-
In the help section of the cli you might see help text for some commands with
gcddrather thancddfor now. This is because the main script is a wrapper around a CLI made in golang using cobra. That CLI uses thegcddcommand as it's root command -
The
cdoworks well on mac, but for linux, it only works on gnome.
Suggestions, criticisms, comments and contributions of any type are always welcome