From ad773352115fb8f11b1945254596700ac16262ff Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Tue, 17 Jan 2017 02:02:28 +0000 Subject: [PATCH] Fix ZSH dependency on system packages --- .zshrc | 9 ++++----- scripts/zsh-setup | 10 ++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100755 scripts/zsh-setup diff --git a/.zshrc b/.zshrc index ba82348..5f232fb 100644 --- a/.zshrc +++ b/.zshrc @@ -1,11 +1,11 @@ unsetopt MULTIBYTE # Path to your oh-my-zsh installation. -ZSH=/usr/share/oh-my-zsh +ZSH=$HOME/.local/share/oh-my-zsh # Set the theme ZSH_THEME="fishy" -DISABLE_AUTO_UPDATE="true" +#DISABLE_AUTO_UPDATE="true" CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" ZSH_CONFIG_DIR=$CONFIG_DIR/zsh @@ -43,14 +43,13 @@ bindkey "^[^[[B" down-line-or-beginning-search # Down zstyle ':completion:*:sudo::' environ PATH="/sbin:/usr/sbin:$PATH" HOME="/root" zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' -zstyle :compinstall filename '/home/frebib/.zshrc' +zstyle :compinstall filename "$HOME/.zshrc" autoload -U compinit ; compinit plugins=(command-not-found history-substring-search sudo zsh-autosuggestions zsh-completions) source $ZSH/oh-my-zsh.sh - -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source $ZSH/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}") ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-substring-search-up history-substring-search-down) diff --git a/scripts/zsh-setup b/scripts/zsh-setup new file mode 100755 index 0000000..b115c99 --- /dev/null +++ b/scripts/zsh-setup @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +dest="$HOME/.local/share" +mkdir -p "$dest" +cd "$dest" + +git clone https://github.com/robbyrussell/oh-my-zsh.git oh-my-zsh +cd oh-my-zsh/plugins +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git