https://github.com/svrana/cdp
Change to commonly used directories quickly
https://github.com/svrana/cdp
bash command-line-tool
Last synced: 3 months ago
JSON representation
Change to commonly used directories quickly
- Host: GitHub
- URL: https://github.com/svrana/cdp
- Owner: svrana
- License: mit
- Created: 2018-03-20T03:22:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-30T17:51:43.000Z (over 6 years ago)
- Last Synced: 2025-03-24T04:57:05.462Z (3 months ago)
- Topics: bash, command-line-tool
- Language: Shell
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cdp
## What is it?
cdp is a command line tool that helps you quickly move to directories you use
often. cdp is like CDPATH in that you define a list of directories to search
for the directory you type on the command line. Unlike CDPATH it allows you
to move to an arbitrary depth per path and supplements normal cd usage but does
not change it.## Requirements
* Bash
* [fd](https://github.com/sharkdp/fd)## Installation
Clone this repo somewhere and `source cdp.sh`. Or just
```
curl https://raw.githubusercontent.com/svrana/cdp/master/cdp.sh > cdp.sh
source cdp.sh
```## Configuration
Set the CDP_DIR_SPEC environment variable. CDP_DIR_SPEC is a list of directories
to search and the maximum depth to search in each directory for a match.For example, if you define CDP_DIR_SPEC like I do:
```bash
export CDP_DIR_SPEC=~/Projects:2;$GOPATH/src/github.com:3
```Then if you type `cdp go-immutable` you will find yourself in $GOPATH/src/github.com/hashicorp/go-immutable-radix
assuming such a directory exists on your filesystem. Note that search is fuzzy and the first found match is
returned.