19
19
- [x] Set variable (temporary and permanent)
20
20
- [x] Delete variable (temporary and permanent)
21
21
- [x] Load variables from dotenv-style file (temporary and permanent)
22
- - [ ] Add string to the end of variable
22
+ - [x ] Add string to the end of variable
23
23
- [ ] Set and delete multiple variables at once
24
24
# Get started
25
25
## Installing
@@ -64,7 +64,7 @@ You can run `envfetch help` to see help message or `envfetch --version` to see p
64
64
65
65
### Command list
66
66
#### Set
67
- Set environment variable and run process.
67
+ Set environment variable and optionally run process.
68
68
69
69
Usage:
70
70
` envfetch set <KEY> <VALUE> [PROCESS] ` , where:
@@ -83,7 +83,26 @@ For example:
83
83
$ envfetch set MY_VAR " Hello" " npm run" # temporary for process
84
84
$ envfetch set MY_VAR " Hello" --global # permanent system-wide
85
85
```
86
+ #### Add
87
+ Add value to the end of environment variable and optionally run the process
86
88
89
+ Usage:
90
+ ` envfetch add <KEY> <VALUE> [PROCESS] ` , where:
91
+ - ` KEY ` - name of environment variable
92
+ - ` VALUE ` - value of environment variable to add
93
+ - ` PROCESS ` - name of process which you want to run (optional if --global is used)
94
+
95
+ Options:
96
+ - ` --help ` /` -h ` - show help message
97
+ - ` --global ` /` -g ` - update variable permanently in system environment
98
+ - On Windows: stores in registry
99
+ - On Unix: stores in shell config (.bashrc, .zshrc, or config.fish)
100
+
101
+ For example:
102
+ ``` shell
103
+ $ envfetch add PATH " ../hello.exe" " crago run" # temporary for process
104
+ $ envfetch add MY_VAR " Hello" --global # permanent system-wide
105
+ ```
87
106
#### Print
88
107
Print all environment variables
89
108
@@ -121,7 +140,7 @@ $ envfetch get MY_VAR
121
140
```
122
141
It will print value of specified variable.
123
142
#### Delete
124
- Delete variable and start process.
143
+ Delete variable and optionally start process.
125
144
126
145
Usage:
127
146
` envfetch delete <KEY> [PROCESS] ` , where:
@@ -139,7 +158,7 @@ $ envfetch delete MY_VAR --global # permanent system-wide
139
158
```
140
159
141
160
#### Load
142
- Load environment variables from dotenv-style file and run process.
161
+ Load environment variables from dotenv-style file and optionally run process.
143
162
144
163
Usage:
145
164
` envfetch load [PROCESS] ` , where:
0 commit comments