Skip to content

Instantly share code, notes, and snippets.

@ipetepete
Last active September 1, 2017 14:37
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 ipetepete/3076572d2738455a6c2ebbdec6a5ecc0 to your computer and use it in GitHub Desktop.
Save ipetepete/3076572d2738455a6c2ebbdec6a5ecc0 to your computer and use it in GitHub Desktop.
Base minimal installation of shell tools
# set the install command as an env var
# $ export INSTALL_CMD="sudo yum install"
${INSTALL_CMD} vim -y
${INSTALL_CMD} zsh -y
${INSTALL_CMD} git -y
${INSTALL_CMD} curl -y
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh| zsh
cat <<EOT > ~/.zshrc
source ~/.zplug/init.zsh
bindkey -v
zplug "modules/prompt", from:prezto
# Can manage local plugins
# zplug "~/.zsh", from:local
# Load theme file
#zplug 'dracula/zsh', as:theme
zstyle ':prezto:module:prompt' theme 'skwp'
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# vim visual prompt
function zle-line-init zle-keymap-select {
VIM_PROMPT="%{$fg_bold[yellow]%} [% NORMAL]% %{$reset_color%}"
#RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $(git_custom_status) $EPS1"
RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1"
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
export KEYTIMEOUT=1
# Then, source plugins and add commands to /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
zplug load # --verbose
EOT
zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment