https://github.com/taurusolson/sd
Swap directories
https://github.com/taurusolson/sd
Last synced: 9 months ago
JSON representation
Swap directories
- Host: GitHub
- URL: https://github.com/taurusolson/sd
- Owner: TaurusOlson
- Created: 2014-06-18T21:25:54.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-18T22:07:58.000Z (almost 12 years ago)
- Last Synced: 2025-07-18T18:54:05.494Z (11 months ago)
- Language: Shell
- Size: 809 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sd
## What is `sd`?
`sd` could stand for 'swap directories' or 'sed on directories'. It's another command like `z`, `bd` and
other commands you run in your shell to change quickly a directory.

## Installation
$ git clone https://github.com/TaurusOlson/sd ~/.sd
$ source ~/.sd/sd
## Usage
Suppose you have this kind of tree:
$ tree
.
├── A
│ ├── dataset1
│ ├── dataset2
│ └── dataset3
└── B
├── dataset1
├── dataset2
└── dataset3
$ cd A/dataset1
`sd` allows you quickly jump from one source directory to a target directory by specifying their names.
Jump from `dataset1` to `dataset2`:
$ sd dataset1 dataset2
Or simply:
$ sd 1 2
# you are now in path/to/A/dataset2
Jump from `A` to `B`:
$ sd A B
# you are now in path/to/B/dataset2
When only one argument is provided, `sd` assumes it is the source directory is
the current directory and the target directory is the first argument:
$ sd dataset3
# you are now in path/to/B/dataset3