Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cda

Command line app for creating and managing cd aliases.

cda

Installation

This tool can be installed as a Homebrew tap

brew tap coffee-cup/cda
brew install cda

Run cda init and see usage instructions.

Usage

❯ cda -h
Usage: cda COMMAND
  Create and manage cd aliases

Available options:
  -h,--help                Show this help text

Available commands:
  list                     List cd aliases
  init                     Initializes alias file
  set                      Create cd alias
  rm                       Remove cd alias

Init

Initializes the aliases with

cda init

Then place

export -f cda () { command cda "$@"; source ~/.cda; }; source ~/.cda;

in your ~/.bash_profile or ~/.zshrc or equivalent. This bash function just sources the alias file after each run of cda and on startup of your shell.

You should then source your config (~/.bash_profile or ~/.zshrc) to load this function.

Create Alias

Create and alias called NAME which points to DIRECTORY

cda set NAME DIRECTORY

For example, create an alias called p which will cd you into the ~/dev/project directory.

~/dev/project
❯ cda set p .
Created alias p

~/dev/project
❯ cda list
p -> /Users/user/dev/project

You can then use the alias with the p command.

Remove Alias

cda rm NAME

For example,

cda rm d

Development

Use Stack.

stack build
stack exec cda COMMAND

About

Create and manage cd aliases

Resources

License

Packages

No packages published