Compare commits
23 commits
Author | SHA1 | Date | |
---|---|---|---|
33ce3aa836 | |||
9f3b8c5de8 | |||
9cf5287c49 | |||
75fb0068a0 | |||
f6002e0668 | |||
a3f9c9f462 | |||
63dc963b00 | |||
e6776b9564 | |||
1975a585c0 | |||
f3ae58d3eb | |||
9061406734 | |||
29a2860649 | |||
51e5d74b70 | |||
2688ff59a1 | |||
a9bec11e31 | |||
7b205e5b2b | |||
3dd89cd9bf | |||
6157aa7c2c | |||
fb2394591b | |||
04f520aa1d | |||
42663a579e | |||
385527ed4c | |||
5389285e02 |
16 changed files with 203 additions and 77 deletions
1
LICENSE
1
LICENSE
|
@ -1,5 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2017 Chloe Kudryavtsev
|
||||||
Copyright (c) 2019 George Rawlinson <mailto:george@rawlinson.net.nz>
|
Copyright (c) 2019 George Rawlinson <mailto:george@rawlinson.net.nz>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
|
|
@ -1,13 +1,23 @@
|
||||||
# colour output in man
|
#
|
||||||
# source: https://wiki.archlinux.org/index.php/Color_output_in_console#man
|
# coloured-man
|
||||||
man() {
|
#
|
||||||
LESS_TERMCAP_md=$'\e[01;31m' \
|
|
||||||
LESS_TERMCAP_me=$'\e[0m' \
|
# https://wiki.archlinux.org/index.php/Color_output_in_console#man
|
||||||
LESS_TERMCAP_se=$'\e[0m' \
|
|
||||||
LESS_TERMCAP_so=$'\e[01;44;33m' \
|
if [[ -v OSTYPE ]]; then
|
||||||
LESS_TERMCAP_ue=$'\e[0m' \
|
if [[ "$OSTYPE" == "linux"* ]]; then
|
||||||
LESS_TERMCAP_us=$'\e[01;32m' \
|
export MANPAGER="less -R --use-color -Dd+r -Du+b"
|
||||||
command man "$@"
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
}
|
man() {
|
||||||
|
LESS_TERMCAP_md=$'\e[01;31m' \
|
||||||
|
LESS_TERMCAP_me=$'\e[0m' \
|
||||||
|
LESS_TERMCAP_se=$'\e[0m' \
|
||||||
|
LESS_TERMCAP_so=$'\e[01;44;33m' \
|
||||||
|
LESS_TERMCAP_ue=$'\e[0m' \
|
||||||
|
LESS_TERMCAP_us=$'\e[01;32m' \
|
||||||
|
command man "$@"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
||||||
|
|
24
plugins/npm
Normal file
24
plugins/npm
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#
|
||||||
|
# npm
|
||||||
|
#
|
||||||
|
|
||||||
|
# Install NPM packages globally without requiring sudo
|
||||||
|
# https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
|
||||||
|
if command -v npm &> /dev/null; then
|
||||||
|
|
||||||
|
# Use XDG dirs
|
||||||
|
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/config"
|
||||||
|
export NPM_CONFIG_CACHE="$XDG_CACHE_HOME/npm"
|
||||||
|
export NPM_CONFIG_TMP="$XDG_RUNTIME_DIR/npm"
|
||||||
|
export NPM_CONFIG_PREFIX="$XDG_DATA_HOME/npm"
|
||||||
|
|
||||||
|
# add npm binary directory to PATH
|
||||||
|
path+=("$NPM_CONFIG_PREFIX/bin")
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# Rare, but some npm packages install man pages...
|
||||||
|
MANPATH="$NPM_CONFIG_PREFIX/share/man:$(manpath)"
|
||||||
|
export MANPATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
12
plugins/pyenv
Normal file
12
plugins/pyenv
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#
|
||||||
|
# pyenv
|
||||||
|
#
|
||||||
|
|
||||||
|
# Add pyenv binary directory to PATH
|
||||||
|
if command -v pyenv &> /dev/null; then
|
||||||
|
export PYENV_ROOT="$HOME/.cache/pyenv"
|
||||||
|
PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"
|
||||||
|
export PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
11
plugins/ruby
Normal file
11
plugins/ruby
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#
|
||||||
|
# ruby
|
||||||
|
#
|
||||||
|
|
||||||
|
# Add rubygem binary directory to PATH
|
||||||
|
if command -v ruby &> /dev/null; then
|
||||||
|
path+=("$(ruby -e "puts Gem.user_dir")/bin")
|
||||||
|
export PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
16
plugins/rust
Normal file
16
plugins/rust
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# rust
|
||||||
|
#
|
||||||
|
|
||||||
|
# Add Cargo binary directory to PATH
|
||||||
|
if command -v cargo &> /dev/null; then
|
||||||
|
# set CARGO_HOME if not set
|
||||||
|
if [ -z "${CARGO_HOME}" ]; then
|
||||||
|
export CARGO_HOME="$HOME/.cargo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
path+=("$CARGO_HOME/bin")
|
||||||
|
export PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
|
@ -1,14 +1,11 @@
|
||||||
|
#
|
||||||
# sudo will be inserted before the current command
|
# sudo will be inserted before the current command
|
||||||
|
#
|
||||||
|
|
||||||
sudo-command-line() {
|
sudo-command-line() {
|
||||||
[[ -z $BUFFER ]] && zle up-history
|
[[ -z $BUFFER ]] && zle up-history
|
||||||
if [[ $BUFFER == sudo\ * ]]; then
|
if [[ $BUFFER == sudo\ * ]]; then
|
||||||
LBUFFER="${LBUFFER#sudo }"
|
LBUFFER="${LBUFFER#sudo }"
|
||||||
elif [[ $BUFFER == $EDITOR\ * ]]; then
|
|
||||||
LBUFFER="${LBUFFER#$EDITOR }"
|
|
||||||
LBUFFER="sudoedit $LBUFFER"
|
|
||||||
elif [[ $BUFFER == sudoedit\ * ]]; then
|
|
||||||
LBUFFER="${LBUFFER#sudoedit }"
|
|
||||||
LBUFFER="$EDITOR $LBUFFER"
|
|
||||||
else
|
else
|
||||||
LBUFFER="sudo $LBUFFER"
|
LBUFFER="sudo $LBUFFER"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
# common aliases
|
#
|
||||||
alias grep='grep --color=auto'
|
# aliases
|
||||||
alias diff='diff --color=auto'
|
#
|
||||||
alias history='fc -il 1' # redirect history to STDOUT with correct timestamps
|
|
||||||
|
# redirect history to STDOUT with correct timestamps
|
||||||
|
alias history='fc -il 1'
|
||||||
|
|
||||||
# safe(r) interactive commands
|
# safe(r) interactive commands
|
||||||
alias rm='rm -i'
|
alias rm='rm -i'
|
||||||
|
@ -9,10 +11,21 @@ alias cp='cp -i'
|
||||||
alias mv='mv -i'
|
alias mv='mv -i'
|
||||||
|
|
||||||
# ls
|
# ls
|
||||||
alias ls='ls --color=auto --human-readable --group-directories-first'
|
if [[ -v OSTYPE ]]; then
|
||||||
alias l='ls --classify -l'
|
if [[ "$OSTYPE" == "linux"* ]]; then
|
||||||
alias la='ls --classify -la'
|
alias ls='ls --color=auto --human-readable --group-directories-first'
|
||||||
alias lr='ls --classify -tR'
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
# check for coreutils presence, otherwise we're using bsd ls
|
||||||
|
if command -v gls &> /dev/null; then
|
||||||
|
alias ls='gls --color=auto --human-readable --group-directories-first'
|
||||||
|
else
|
||||||
|
alias ls='ls -G'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
alias l='ls -l'
|
||||||
|
alias la='ls -la'
|
||||||
|
alias lr='ls -lR'
|
||||||
|
|
||||||
# directories
|
# directories
|
||||||
setopt AUTO_CD # prefix command with 'cd' if it cannot be executed, e.g. '..' becomes 'cd ..'
|
setopt AUTO_CD # prefix command with 'cd' if it cannot be executed, e.g. '..' becomes 'cd ..'
|
||||||
|
@ -40,6 +53,10 @@ if command -v git &> /dev/null; then
|
||||||
# push/pull
|
# push/pull
|
||||||
alias gp='git push'
|
alias gp='git push'
|
||||||
alias gl='git pull'
|
alias gl='git pull'
|
||||||
|
|
||||||
|
# diff
|
||||||
|
alias gd='git diff'
|
||||||
|
alias gdca='git diff --cached'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# pacman
|
# pacman
|
||||||
|
@ -67,8 +84,6 @@ if command -v pacman &> /dev/null; then
|
||||||
LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \
|
LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \
|
||||||
awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}'
|
awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}'
|
||||||
}
|
}
|
||||||
|
|
||||||
export CHROOT="${XDG_CACHE_HOME}/chroot"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
|
#
|
||||||
# key bindings
|
# key bindings
|
||||||
|
#
|
||||||
|
|
||||||
|
# set emacs mode
|
||||||
|
bindkey -e
|
||||||
|
|
||||||
# create a zkbd compatible hash;
|
# create a zkbd compatible hash;
|
||||||
# to add other keys to this hash, see: man 5 terminfo
|
# to add other keys to this hash, see: man 5 terminfo
|
||||||
|
@ -30,9 +35,12 @@ zle -N down-line-or-beginning-search
|
||||||
[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" up-line-or-history
|
[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" up-line-or-history
|
||||||
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" down-line-or-history
|
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" down-line-or-history
|
||||||
[[ -n "${key[ShiftTab]}" ]] && bindkey -- "${key[ShiftTab]}" reverse-menu-complete
|
[[ -n "${key[ShiftTab]}" ]] && bindkey -- "${key[ShiftTab]}" reverse-menu-complete
|
||||||
|
bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word
|
||||||
|
bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word
|
||||||
|
|
||||||
# make sure the terminal is in application mode when zle is active
|
|
||||||
# only then are the values from $terminfo valid
|
# Finally, make sure the terminal is in application mode, when zle is
|
||||||
|
# active. Only then are the values from $terminfo valid.
|
||||||
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
|
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
|
||||||
autoload -Uz add-zle-hook-widget
|
autoload -Uz add-zle-hook-widget
|
||||||
zle_application_mode_start() {
|
zle_application_mode_start() {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
#
|
||||||
# completion configuration
|
# completion configuration
|
||||||
|
#
|
||||||
|
|
||||||
# have the menu highlight as we cycle through options
|
# have the menu highlight as we cycle through options
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
|
@ -18,8 +20,8 @@ setopt COMPLETE_ALIASES
|
||||||
# complete . and .. special directories
|
# complete . and .. special directories
|
||||||
zstyle ':completion:*' special-dirs true
|
zstyle ':completion:*' special-dirs true
|
||||||
|
|
||||||
# use caching so that commands like apt and dpkg complete are useable
|
# enable caching so that commands like apt and dpkg are completeable
|
||||||
zstyle ':completion::complete:*' use-cache 1
|
zstyle ':completion::complete:*' use-cache 1
|
||||||
zstyle ':completion::complete:*' cache-path "{$ZCACHEDIR}"
|
zstyle ':completion::complete:*' cache-path "${ZCACHEDIR}"
|
||||||
|
|
||||||
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
# locale [en_NZ]
|
#
|
||||||
export LANG='en_NZ.UTF-8'
|
# environment variables
|
||||||
export LC_ALL='en_NZ.UTF-8'
|
#
|
||||||
|
|
||||||
# set default values
|
# set default pager
|
||||||
export EDITOR='nvim'
|
|
||||||
export PAGER='less'
|
export PAGER='less'
|
||||||
export LESS='-R'
|
export LESS='-R'
|
||||||
|
|
||||||
# less - disable histfile generation
|
# ensure less does not generate history file
|
||||||
export LESSHISTFILE='/dev/null'
|
export LESSHISTFILE='/dev/null'
|
||||||
|
|
||||||
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
# It is important that this environment variable always reflects the out‐
|
# It is important that this environment variable always reflects the out‐
|
||||||
# put of the tty command.
|
# put of the tty command.
|
||||||
|
|
||||||
GPG_TTY=$(tty)
|
if command -v gpg-agent &> /dev/null; then
|
||||||
export GPG_TTY
|
GPG_TTY=$(tty)
|
||||||
|
export GPG_TTY
|
||||||
|
fi
|
||||||
|
|
||||||
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
#
|
||||||
|
# zsh-specific options
|
||||||
|
#
|
||||||
|
|
||||||
# general
|
# general
|
||||||
setopt NO_BEEP # disable terminal beep
|
setopt NO_BEEP # disable terminal beep
|
||||||
setopt MULTI_OS # pipe to multiple outputs
|
setopt MULTI_OS # pipe to multiple outputs
|
||||||
setopt INTERACTIVE_COMMENTS # allow comments in interactive shell
|
setopt INTERACTIVE_COMMENTS # allow comments in interactive shell
|
||||||
setopt VI # vi-like keybindings
|
|
||||||
#setopt KSH_ARRAYS # whoever thought non-0 indices needs to be shot
|
|
||||||
|
|
||||||
# globbing
|
# globbing
|
||||||
setopt NO_CASE_GLOB # case insensitive globbing
|
setopt NO_CASE_GLOB # case insensitive globbing
|
||||||
|
@ -11,17 +13,17 @@ setopt EXTENDED_GLOB # enable zsh globbing features
|
||||||
setopt NUMERIC_GLOB_SORT # sort globs numerically, not by letter
|
setopt NUMERIC_GLOB_SORT # sort globs numerically, not by letter
|
||||||
|
|
||||||
# history
|
# history
|
||||||
HISTSIZE=100000 # set history size to 100K
|
HISTSIZE=100000 # set history size to 100K
|
||||||
SAVEHIST="${HISTSIZE}" # cap history size at 100K
|
SAVEHIST="${HISTSIZE}" # cap history size at 100K
|
||||||
setopt EXTENDED_HISTORY # record timestamp on command in HISTFILE
|
setopt EXTENDED_HISTORY # record timestamp on command in HISTFILE
|
||||||
setopt HIST_EXPIRE_DUPS_FIRST # delete duplicates first when HISTFILE > HISTSIZE
|
setopt HIST_EXPIRE_DUPS_FIRST # delete duplicates first when HISTFILE > HISTSIZE
|
||||||
setopt APPEND_HISTORY # ignore duplicate commands in history list
|
setopt APPEND_HISTORY # ignore duplicate commands in history list
|
||||||
setopt HIST_FIND_NO_DUPS # when searching history don't display results already cycled through twice
|
setopt HIST_FIND_NO_DUPS # when searching history don't display results already cycled through twice
|
||||||
setopt HIST_IGNORE_SPACE # ignore commands that start with space
|
setopt HIST_IGNORE_SPACE # ignore commands that start with space
|
||||||
setopt HIST_VERIFY # show command with history expansion to user before running it
|
setopt HIST_VERIFY # show command with history expansion to user before running it
|
||||||
setopt SHARE_HISTORY # shares history across multiple zsh sessions, in real time
|
setopt SHARE_HISTORY # shares history across multiple zsh sessions, in real time
|
||||||
setopt HIST_IGNORE_ALL_DUPS # do not write commands to history that are duplicates of the previous command
|
setopt HIST_IGNORE_ALL_DUPS # do not write commands to history that are duplicates of the previous command
|
||||||
setopt HIST_REDUCE_BLANKS # remove erroneous blanks from commands before appending to history
|
setopt HIST_REDUCE_BLANKS # remove erroneous blanks from commands before appending to history
|
||||||
|
|
||||||
# create history file
|
# create history file
|
||||||
[ -z "${HISTFILE}" ] && HISTFILE="${ZCACHEDIR}/zhistory"
|
[ -z "${HISTFILE}" ] && HISTFILE="${ZCACHEDIR}/zhistory"
|
||||||
|
|
28
source/xdg.zsh
Normal file
28
source/xdg.zsh
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#
|
||||||
|
# xdg base directory variables
|
||||||
|
#
|
||||||
|
|
||||||
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
|
||||||
|
if [ -z "${XDG_CONFIG_HOME}" ]; then
|
||||||
|
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${XDG_CACHE_HOME}" ]; then
|
||||||
|
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${XDG_DATA_HOME}" ]; then
|
||||||
|
export XDG_DATA_HOME="${HOME}/.local/share"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${XDG_STATE_HOME}" ]; then
|
||||||
|
export XDG_STATE_HOME="${HOME}/.local/state"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# XDG_RUNTIME_DIR is set when using pam_systemd
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
export XDG_RUNTIME_DIR=/tmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
9
zshenv
9
zshenv
|
@ -1,12 +1,15 @@
|
||||||
# set environment variable $ZDOTDIR to $HOME/.config/zsh
|
# set environment variables to conform with XDG base directory specification
|
||||||
export ZDOTDIR="${HOME}/.config/zsh"
|
export ZDOTDIR="${HOME}/.config/zsh"
|
||||||
# set environment variable $ZCACHEDIR to $HOME/.cache/zsh
|
|
||||||
export ZCACHEDIR="${HOME}/.cache/zsh"
|
export ZCACHEDIR="${HOME}/.cache/zsh"
|
||||||
# set environment variable $ZSYSDIR to /usr/share/zsh-grawlinson
|
|
||||||
|
# set framework location
|
||||||
export ZSYSDIR="/usr/share/zsh-grawlinson"
|
export ZSYSDIR="/usr/share/zsh-grawlinson"
|
||||||
|
|
||||||
# create missing folders
|
# create missing folders
|
||||||
if [ ! -d "${ZDOTDIR}" ]; then mkdir -p "${ZDOTDIR}"; fi
|
if [ ! -d "${ZDOTDIR}" ]; then mkdir -p "${ZDOTDIR}"; fi
|
||||||
if [ ! -d "${ZCACHEDIR}" ]; then mkdir -p "${ZCACHEDIR}"; fi
|
if [ ! -d "${ZCACHEDIR}" ]; then mkdir -p "${ZCACHEDIR}"; fi
|
||||||
|
|
||||||
|
# create empty zshrc if it does not exist
|
||||||
|
if [ ! -e "${ZDOTDIR}/.zshrc" ]; then touch "${ZDOTDIR}/.zshrc"; fi
|
||||||
|
|
||||||
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
# vim: ft=zsh expandtab tabstop=2 shiftwidth=2
|
||||||
|
|
40
zshrc
40
zshrc
|
@ -1,27 +1,11 @@
|
||||||
# setup umask [0755]
|
# setup umask [0755]
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
# spath -> plugins; apath -> drop-in path
|
# ensure there are no duplicates in $PATH
|
||||||
typeset -T SPATH spath
|
typeset -U PATH path
|
||||||
typeset -T APATH apath
|
|
||||||
typeset -U PATH path # discard duplicates
|
|
||||||
|
|
||||||
# example: append to path, then make available to child processes
|
# user files sourced before system files
|
||||||
# path+=('$VAR'); export PATH
|
# completions sourced after the functions they complete
|
||||||
|
|
||||||
# default path values
|
|
||||||
spath=(
|
|
||||||
"$ZDOTDIR/plugins"
|
|
||||||
"$ZSYSDIR/plugins"
|
|
||||||
)
|
|
||||||
apath=(
|
|
||||||
"$ZDOTDIR/source"
|
|
||||||
"$ZSYSDIR/source"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# user stuff comes first
|
|
||||||
# completions come after the functions they complete
|
|
||||||
fpath+=(
|
fpath+=(
|
||||||
"$ZDOTDIR/functions"
|
"$ZDOTDIR/functions"
|
||||||
"$ZDOTDIR/completions"
|
"$ZDOTDIR/completions"
|
||||||
|
@ -31,11 +15,23 @@ fpath+=(
|
||||||
"$ZSYSDIR/prompts"
|
"$ZSYSDIR/prompts"
|
||||||
)
|
)
|
||||||
|
|
||||||
# source every zsh file in every APATH directory
|
# drop-in directory (like /etc/zsh.d)
|
||||||
|
# sourceall iterates over APATH, sourcing every file it finds
|
||||||
|
typeset -T APATH apath
|
||||||
|
apath=(
|
||||||
|
"$ZDOTDIR/source"
|
||||||
|
"$ZSYSDIR/source"
|
||||||
|
)
|
||||||
autoload sourceall
|
autoload sourceall
|
||||||
sourceall zsh
|
sourceall zsh
|
||||||
|
|
||||||
# plugins
|
# plugins (explicitly loaded)
|
||||||
|
# autosource iterates over SPATH until a matching plugin is found and sourced
|
||||||
|
typeset -T SPATH spath
|
||||||
|
spath=(
|
||||||
|
"$ZDOTDIR/plugins"
|
||||||
|
"$ZSYSDIR/plugins"
|
||||||
|
)
|
||||||
autoload autosource
|
autoload autosource
|
||||||
autosource coloured-man
|
autosource coloured-man
|
||||||
autosource sudo
|
autosource sudo
|
||||||
|
|
Loading…
Reference in a new issue