https://github.com/nodef/extra-cd.sh
Change to directories with shortcut names in Linux Terminal.
https://github.com/nodef/extra-cd.sh
bash cd change directory extra function linux name script shortcut terminal
Last synced: about 1 month ago
JSON representation
Change to directories with shortcut names in Linux Terminal.
- Host: GitHub
- URL: https://github.com/nodef/extra-cd.sh
- Owner: nodef
- License: mit
- Created: 2017-10-16T18:46:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-10T19:59:33.000Z (about 1 year ago)
- Last Synced: 2025-08-11T01:09:42.905Z (10 months ago)
- Topics: bash, cd, change, directory, extra, function, linux, name, script, shortcut, terminal
- Language: Shell
- Homepage: https://www.npmjs.com/package/extra-cd.sh
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Change to directories with shortcut names in Linux Terminal.
> 1. Download [bash script](https://github.com/bashf/extra-cd/releases/download/1.0.0/ecd).
> 2. Set execute permission on the `bash script`, and copy to `~/scripts`.
> 3. Source the script in .bashrc: `echo "source " >> ~/.bashrc`.
```bash
$ ecd [- | [+ [path] | - | =]]
# [] -> optional argument
# <> -> argument value
```
```bash
# change to workspace directory
$ ecd /local/mnt/workspace
# change to up one directory
$ ecd ..
# stay at current directory (list contents)
$ ecd .
# change to previous directory
$ ecd -
# add current directory as shortcut
$ ecd +work
# change to root directory
$ ecd /
# change to workspace directory using shortcut
$ ecd =work
# remove workspace shortcut
$ ecd -work
# add relative path shortcut
$ ecd +up3 ../../..
# go up 3 directories
$ ecd =up3
# remove relative path shortcut
$ ecd -up3
```
[](https://bashf.github.io)
