Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nodef/extra-cd
Change the working directory, with shortcuts and listing.
https://github.com/nodef/extra-cd
cd change cli command directory extra interface line
Last synced: 7 days ago
JSON representation
Change the working directory, with shortcuts and listing.
- Host: GitHub
- URL: https://github.com/nodef/extra-cd
- Owner: nodef
- License: mit
- Created: 2018-08-01T00:43:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T14:30:53.000Z (almost 2 years ago)
- Last Synced: 2024-12-27T19:45:50.953Z (about 1 month ago)
- Topics: cd, change, cli, command, directory, extra, interface, line
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/extra-cd.sh
- Size: 88.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
Change the working directory, with shortcuts and listing.
🐚 [Shell](https://www.npmjs.com/package/extra-cd.sh),
🖥️ [Command prompt](https://www.npmjs.com/package/extra-cd.cmd),
📜 [Files](https://unpkg.com/extra-cd.sh/).The [cd] (or `chdir`) is a [builtin shell command] to *change* the *current*
*working directory* of the *shell*. This package provides a **user-friendly**
**version** of the `cd` command, called `ecd`. It **lists the contents** of a
directory upon changing directory, and also provides the ability to **save**
**absolute and relative shortcuts**. Please check the examples below.> Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).
[cd]: https://en.wikipedia.org/wiki/Cd_(command)
[builtin shell command]: https://en.wikipedia.org/wiki/Shell_builtin
```bash
# Install on Linux
$ npm install -g extra-cd.sh
$ source "$(which extra-cd)"# Install on Windows
$ npm install -g extra-cd.cmd
```
```bash
$ ecd [-] [+/-/=] [path]
# [] -> optional argument
# <> -> argument value# 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
```
## References:
- [cd (command)](https://en.wikipedia.org/wiki/Cd_(command))
[![](https://img.youtube.com/vi/aZ1Zp3gNcEI/maxresdefault.jpg)](https://www.youtube.com/watch?v=aZ1Zp3gNcEI)
[![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)
[![DOI](https://zenodo.org/badge/143084625.svg)](https://zenodo.org/badge/latestdoi/143084625)