extra-cd.sh 1.1.21 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +19 -17
- package/index.sh +3 -0
- package/package.json +3 -5
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
Change the working directory, with shortcuts and listing.<br>
|
|
2
|
+
|
|
3
|
+
▌
|
|
2
4
|
🐚 [Shell](https://www.npmjs.com/package/extra-cd.sh),
|
|
3
5
|
🖥️ [Command prompt](https://www.npmjs.com/package/extra-cd.cmd),
|
|
4
6
|
📜 [Files](https://unpkg.com/extra-cd.sh/).
|
|
5
7
|
|
|
8
|
+
<br>
|
|
9
|
+
|
|
6
10
|
The [cd] (or `chdir`) is a [builtin shell command] to *change* the *current*
|
|
7
11
|
*working directory* of the *shell*. This package provides a **user-friendly**
|
|
8
|
-
**version** of the `cd` command, called `
|
|
12
|
+
**version** of the `cd` command, called `xcd`. It **lists the contents** of a
|
|
9
13
|
directory upon changing directory, and also provides the ability to **save**
|
|
10
14
|
**absolute and relative shortcuts**. Please check the examples below.
|
|
11
15
|
|
|
12
|
-
> Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).
|
|
13
|
-
|
|
14
16
|
[cd]: https://en.wikipedia.org/wiki/Cd_(command)
|
|
15
17
|
[builtin shell command]: https://en.wikipedia.org/wiki/Shell_builtin
|
|
16
18
|
|
|
@@ -29,43 +31,43 @@ $ npm install -g extra-cd.cmd
|
|
|
29
31
|
<br>
|
|
30
32
|
|
|
31
33
|
```bash
|
|
32
|
-
$
|
|
34
|
+
$ xcd [-] [+/-/=<shortcut>] [path]
|
|
33
35
|
# [] -> optional argument
|
|
34
36
|
# <> -> argument value
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
# Change to workspace directory
|
|
38
|
-
$
|
|
40
|
+
$ xcd /local/mnt/workspace
|
|
39
41
|
|
|
40
42
|
# Change to up one directory
|
|
41
|
-
$
|
|
43
|
+
$ xcd ..
|
|
42
44
|
|
|
43
45
|
# Stay at current directory (list contents)
|
|
44
|
-
$
|
|
46
|
+
$ xcd .
|
|
45
47
|
|
|
46
48
|
# Change to previous directory
|
|
47
|
-
$
|
|
49
|
+
$ xcd -
|
|
48
50
|
|
|
49
51
|
# Add current directory as shortcut
|
|
50
|
-
$
|
|
52
|
+
$ xcd +work
|
|
51
53
|
|
|
52
54
|
# Change to root directory
|
|
53
|
-
$
|
|
55
|
+
$ xcd /
|
|
54
56
|
|
|
55
57
|
# Change to workspace directory using shortcut
|
|
56
|
-
$
|
|
58
|
+
$ xcd =work
|
|
57
59
|
|
|
58
60
|
# Remove workspace shortcut
|
|
59
|
-
$
|
|
61
|
+
$ xcd -work
|
|
60
62
|
|
|
61
63
|
# Add relative path shortcut
|
|
62
|
-
$
|
|
64
|
+
$ xcd +up3 ../../..
|
|
63
65
|
|
|
64
66
|
# Go up 3 directories
|
|
65
|
-
$
|
|
67
|
+
$ xcd =up3
|
|
66
68
|
|
|
67
69
|
# Remove relative path shortcut
|
|
68
|
-
$
|
|
70
|
+
$ xcd -up3
|
|
69
71
|
```
|
|
70
72
|
|
|
71
73
|
<br>
|
|
@@ -80,6 +82,6 @@ $ ecd -up3
|
|
|
80
82
|
<br>
|
|
81
83
|
|
|
82
84
|
|
|
83
|
-
[](https://wolfram77.github.io)<br>
|
|
84
86
|
[](https://nodef.github.io)
|
|
85
|
-
|
|
87
|
+

|
package/index.sh
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extra-cd.sh",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Change the working directory, with shortcuts and listing.",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"main": "index.sh",
|
|
7
7
|
"bin": {
|
|
8
8
|
"extra-cd": "index.sh",
|
|
9
|
+
"xcd": "index.sh",
|
|
9
10
|
"ecd": "index.sh"
|
|
10
11
|
},
|
|
11
12
|
"scripts": {
|
|
@@ -34,8 +35,5 @@
|
|
|
34
35
|
"bugs": {
|
|
35
36
|
"url": "https://github.com/nodef/extra-cd/issues"
|
|
36
37
|
},
|
|
37
|
-
"homepage": "https://github.com/nodef/extra-cd#readme"
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"extra-build": "^2.2.42"
|
|
40
|
-
}
|
|
38
|
+
"homepage": "https://github.com/nodef/extra-cd#readme"
|
|
41
39
|
}
|