File tree 2 files changed +31
-1
lines changed 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
10
10
11
11
For a steady stream of TILs, [ sign up for my newsletter] ( https://crafty-builder-6996.ck.page/e169c61186 ) .
12
12
13
- _ 1453 TILs and counting..._
13
+ _ 1454 TILs and counting..._
14
14
15
15
---
16
16
@@ -80,6 +80,7 @@ _1453 TILs and counting..._
80
80
* [ XState] ( #xstate )
81
81
* [ YAML] ( #yaml )
82
82
* [ Zod] ( #zod )
83
+ * [ Zsh] ( #zsh )
83
84
84
85
---
85
86
@@ -1726,6 +1727,10 @@ _1453 TILs and counting..._
1726
1727
- [ Incorporate Existing Type Into Zod Schema] ( zod/incorporate-existing-type-into-zod-schema.md )
1727
1728
- [ Set Custom Error Message For Nonempty Array] ( zod/set-custom-error-message-for-nonempty-array.md )
1728
1729
1730
+ ### Zsh
1731
+
1732
+ - [ Add To The Path Via Path Array] ( zsh/add-to-the-path-via-path-array.md )
1733
+
1729
1734
## Usage
1730
1735
1731
1736
The ` .vimrc ` file for this project contains a function ` CountTILs ` that can
Original file line number Diff line number Diff line change
1
+ # Add To Path Via Path Array
2
+
3
+ Typically when managing what is on your path in a Unix shell environment, you
4
+ override the ` PATH ` environment variable with ` export ` . This is usually an
5
+ append or prepend to bring along the existing path entries.
6
+
7
+ ``` bash
8
+ $ export PATH=" $PATH :/Users/me/.local/bin"
9
+ ```
10
+
11
+ The ` zsh ` shell environment exposes another way of adding to your path. They
12
+ have a ` path ` array which can be a little easier to work with since you can use
13
+ an array operation instead of string interpolation.
14
+
15
+ Here is how we'd do the same as above:
16
+
17
+ ``` bash
18
+ $ path+=/Users/me/.local/bin
19
+ ```
20
+
21
+ This works because there is an automatic linking in zsh between arrays and
22
+ colon-separated strings (_ scalars_ ).
23
+ [ source] ( https://www.zsh.org/mla/users//2005/msg01132.html )
24
+
25
+ [ source] ( https://superuser.com/a/1447959 )
You can’t perform that action at this time.
0 commit comments