-
Create the following directories:
$HOME/github
&$HOME/github/nmaahc
- easy one liner in terminal:
mkdir -p $HOME/github/nmaahc
- easy one liner in terminal:
-
Go to https://github.com/NMAAHC/zshrc and fork that repo into your own github account
-
cd into
$HOME/github/nmaahc
and, from your own github account repo, clone the repo you just forked:git clone https://github.com/[yourGithubname]/zshrc
-
Check to see that zsh is your default shell:
- type
echo $0
in the terminal, the result should say-zsh
- if it does not, type
cat /etc/shells
and look for the zsh shell - it will be/bin/zsh
- type
chsh -s /bin/zsh
in the terminal, it will ask for you password - restart the termianl and type
echo $0
and it should display-zsh
- type
-
Open
~/.zprofile
in an editor- (If you don't have a
.zprofile
file, simply create one by typing in terminal:touch ~/.zprofile
)
- (If you don't have a
-
past the following into the .zprofile:
export PATH="/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin" # create symlink so that .zshrc .zshrc_alias .zshrc_functions are # linked to your zshrc, zshrc_alias and zshrc_functions files in your local github repo ln -sfn $HOME/github/nmaahc/zshrc/zshrc $HOME/.zshrc ln -sfn $HOME/github/nmaahc/zshrc/zshrc_alias $HOME/.zshrc_alias ln -sfn $HOME/github/nmaahc/zshrc/zshrc_functions $HOME/.zshrc_functions
-
NOTE: This presumes a folder named "nmaahc". One could, of course, clone this repo to a directory of one's choosing and change
$HOME/github/nmaahc/
to the path of the directory.- ex. If you create a folder called
myrepo
on desktop, then the path in your.zprofile
file should be:$HOME/Desktop/myrepo/
- ex. If you create a folder called
-
Restart your CLI and type
echo $PATH
- the output should be
/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
- the output should be
-
Now everything should work. You will now have all of the alias and funcions in the zshrc_alias and zshrc_functions files at your disposal
- example:
- typing
ll
in the terminal will alias tols -lahG
- typing
treeL
in the terminal will alias totree -RapugD --si --du
- typing
rsyncDAMS
will call the funcitonrsync -avvPhi --no-p --stats "${@}"
- typing
- for more examples look at the zshrc_alias and zshrc_functions files. You can also add you own alias or functions!
- example:
Your terminal will now look like this, but with medialab
replaced by your user name:
If you are having issues type ls -lahG ~
and check to see that the symlinks for the zsh files have been created: