https://github.com/shogunpurple/retreat
Retreat to a specified parent directory
https://github.com/shogunpurple/retreat
bash bash-script unix
Last synced: about 1 month ago
JSON representation
Retreat to a specified parent directory
- Host: GitHub
- URL: https://github.com/shogunpurple/retreat
- Owner: shogunpurple
- License: mit
- Created: 2020-02-18T11:11:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-23T01:09:28.000Z (over 6 years ago)
- Last Synced: 2025-06-04T16:18:57.168Z (about 1 year ago)
- Topics: bash, bash-script, unix
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Retreat
**retreat** is a small CLI utility that allows you to move **up** the directory tree to a specified directory.
### Rationale
I always found myself deep in directory structures, especially when working with JavaScript. (node_modules etc). I couldn't find a good way to move back up to a specified directory without `cd ../../../` or similar. So `retreat` was born.
### Installation
`retreat` is installed by running the following command in your terminal. You can install `retreat` via the command-line with `curl`.
#### via curl
```
sh -c "$(curl -fsSL https://raw.githubusercontent.com/shogunpurple/retreat/master/install.sh)"
```
### Usage
```bash
$ pwd
cool_directory/some/nested/directory/where/i/want/to/escape
$ retreat cool_directory
$ pwd
cool_directory
# You can go back to where you were
$ cd -
cool_directory/some/nested/directory/where/i/want/to/escape
```