Skip to content

Commit

Permalink
revises Zsh scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
htr3n committed Jul 24, 2018
1 parent 7a54a79 commit 296f72f
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 11 deletions.
11 changes: 7 additions & 4 deletions antibody.zsh
Expand Up @@ -9,15 +9,18 @@
#
# https://getantibody.github.io/usage
#
local plugins_list=${ZSHCONFIG}/zsh-antibody-plugins_list
local plugins_list=${ZSHCONFIG}/zsh-antibody-plugins-list

local managed_plugins=${ZSHCONFIG}/lib/zsh-managed-plugins.zsh

alias antibody.install="echo 'Installing plugins ... '; /usr/local/bin/antibody bundle < ${plugins_list} > ${managed_plugins}; echo 'Done!'"
function antibody.install(){
echo 'Installing plugins ... '
/usr/local/bin/antibody bundle < ${plugins_list} > ${managed_plugins}
echo 'Done!'
}

function antibody.purge(){
if [[ ! -z "$1" ]]
then
if [[ ! -z "$1" ]]; then
/usr/local/bin/antibody purge $1
fi
}
Expand Down
8 changes: 8 additions & 0 deletions lib/zsh-managed-plugins.zsh
@@ -0,0 +1,8 @@
source /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
fpath+=( /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-autosuggestions )
source /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions/zsh-completions.plugin.zsh
fpath+=( /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-completions )
source /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
fpath+=( /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-syntax-highlighting )
source /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-history-substring-search/zsh-history-substring-search.plugin.zsh
fpath+=( /Users/htr3n/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-zsh-users-SLASH-zsh-history-substring-search )
10 changes: 9 additions & 1 deletion zprofile
Expand Up @@ -4,7 +4,6 @@
#
# Executes commands at login before zshrc.
#

if [[ -z "$LANG" ]]; then
export LANG='en_US.UTF-8'
export LANGUAGE=en_US.UTF-8
Expand All @@ -18,3 +17,12 @@ export LC_NUMERIC=en_US.UTF-8
export LC_TIME=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LESSCHARSET=utf-8

# eliminates duplicates in *paths
typeset -gU cdpath fpath path

# Zsh search path for executable
path=(
/usr/local/{bin,sbin}
$path
)
1 change: 0 additions & 1 deletion zsh-antibody-plugins_list → zsh-antibody-plugins-list
Expand Up @@ -2,4 +2,3 @@ zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
bhilburn/powerlevel9k
6 changes: 5 additions & 1 deletion zshenv
Expand Up @@ -8,7 +8,11 @@ skip_global_compinit=1
# http://disq.us/p/f55b78
setopt noglobalrcs

[[ -s ${ZDOTDIR:-$HOME}/.zprofile ]] && source ${ZDOTDIR:-$HOME}/.zprofile
# https://github.com/sorin-ionescu/prezto/blob/master/runcoms/zshenv
# Ensure that a non-login, non-interactive shell has a defined environment.
if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
source "${ZDOTDIR:-$HOME}/.zprofile"
fi

# Home-made scripts
export PATH=$PATH:${HOME}/.bin
9 changes: 5 additions & 4 deletions zshrc
Expand Up @@ -3,8 +3,9 @@
# vim:filetype=zsh

# for profiling zsh
# https://unix.stackexchange.com/a/329719/27109
#
# zmodload zsh/zprof
#zmodload zsh/zprof

export SCRIPTS=${HOME}/scripts

Expand All @@ -21,8 +22,8 @@ fi
#
# enable auto completion
# https://gist.github.com/ctechols/ca1035271ad134841284
#
#autoload -Uz compinit
#
#autoload -Uz compinit
#if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
# compinit;
#else
Expand All @@ -36,4 +37,4 @@ if [ $(date +'%j') != $(/usr/bin/stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then
compinit
else
compinit -C
fi
fi

0 comments on commit 296f72f

Please sign in to comment.