Skip to content

Instantly share code, notes, and snippets.

@nielspeen
Last active January 31, 2019 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nielspeen/e5a120b5c944556de5d2b1d329f31397 to your computer and use it in GitHub Desktop.
Save nielspeen/e5a120b5c944556de5d2b1d329f31397 to your computer and use it in GitHub Desktop.
Setup ZSH
#!/bin/bash
if [ ! -f /usr/bin/zsh ]; then
apt --yes install zsh
fi
if [ ! -f /tmp/pure-v1.8.0.tar.gz ]; then
wget https://github.com/sindresorhus/pure/archive/v1.8.0.tar.gz -O /tmp/pure-v1.8.0.tar.gz
fi
cd /tmp
tar zxf /tmp/pure-v1.8.0.tar.gz
cp /tmp/pure-1.8.0/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup
cp /tmp/pure-1.8.0/async.zsh /usr/local/share/zsh/site-functions/async
cat > $HOME/.zshrc << EOF
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
NNTPSERVER="snews://news.xs4all.nl:563"
export NNTPSERVER
autoload -U promptinit; promptinit
PURE_CMD_MAX_EXEC_TIME=10
prompt pure
alias slrn="slrn -n"
EOF
cp $HOME/.zshrc /home/niels/.zshrc
chown niels.niels /home/niels/.zshrc
chsh -s /usr/bin/zsh root
chsh -s /usr/bin/zsh niels
rm /etc/motd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment