Last active
September 1, 2017 14:37
-
-
Save ipetepete/3076572d2738455a6c2ebbdec6a5ecc0 to your computer and use it in GitHub Desktop.
Base minimal installation of shell tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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