summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/completion4
-rw-r--r--etc/env6
-rw-r--r--etc/function2
-rw-r--r--etc/parameters2
-rw-r--r--etc/profile4
-rwxr-xr-xinclude/conflicts6
6 files changed, 23 insertions, 1 deletions
diff --git a/etc/completion b/etc/completion
index 09031ca..91b9c47 100644
--- a/etc/completion
+++ b/etc/completion
@@ -4,6 +4,7 @@ zstyle :compinstall filename ~/.zshrc
zstyle ':completion:*' cache-path ~/var/cache/zsh
zstyle ':completion:*' use-cache true
+# Use ls-colors for file completion
check_com -c dircolors && zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# Mark the current selection when tabbing through possible completions
@@ -27,10 +28,11 @@ zstyle ':completion:*:warnings' format \
zstyle ':completion:*' group-name ''
unset char
-# program-specific settings
+# Force menu completion since the input is just a stupid number
zstyle ':completion:*:*:kill:*' menu yes
zstyle ':completion:*:*:(todo|td*):*:items' menu yes
+# $hosts is set from the hosts package
zstyle -e ':completion:*' hosts 'reply=(${(k)hosts})'
if [[ -r $compdump ]] {
diff --git a/etc/env b/etc/env
index 31e734b..dda7cfd 100644
--- a/etc/env
+++ b/etc/env
@@ -3,12 +3,18 @@
ZDIR=$HOME/packages/zsh/etc
PS4='%{'$'\e[0;36m''%}%N%{'$'\e[0m''%}:%{'$'\e[0;33m''%}%i%{'$'\e[0m''%}│'
fpath=($ZDIR/functions $ZDIR/completions $fpath)
+
+# Additional zshenv settings from pkg
[[ -r $ZDIR/../provided/env ]] && source $ZDIR/../provided/env
+
+# local settings, not tracked with git
[[ -r $ZDIR/local-env ]] && source $ZDIR/local-env
export EDITOR==vim
export MPD_HOST=saviour
export CALENDAR_DIR=$HOME/stuff
+
+# Required for various scripts
export HOST
export COLUMNS
export LINES
diff --git a/etc/function b/etc/function
index bd92211..7775757 100644
--- a/etc/function
+++ b/etc/function
@@ -10,6 +10,8 @@ for funcfile in $ZDIR/functions/*(*N);
autoload ${funcfile:t}
unset funcfile
+# Convenient control over system daemons
+# The functions are uppercase to avoid conflicts
# from https://git.tabularazor.org/~mikael/etc/tree/zsh/functions
for action in Start Stop Restart Reload; {
eval "function $action {
diff --git a/etc/parameters b/etc/parameters
index d997560..b3ca1f0 100644
--- a/etc/parameters
+++ b/etc/parameters
@@ -1,4 +1,6 @@
## vim:ft=zsh
+## parameters which are only important for interactive shells.
+## For application-related parameters, see zshenv
# There's no point in having more history than what can be saved on disk
HISTFILE=~/.histfile
diff --git a/etc/profile b/etc/profile
index 4abd99f..823ffb0 100644
--- a/etc/profile
+++ b/etc/profile
@@ -1,4 +1,8 @@
## vim:ft=zsh
+
+# a part of this file uses functions loaded by the zshrc, which is parsed
+# after zprofile by default. So, at the end of the zshrc, zprofile is sourced
+# again and the section after the else is executed
if (( ZPROFILE == 0 )) {
source $HOME/packages/zsh/etc/colors
print -P "${info}>>${reset} this is ${info}$(uname -srm)${reset} on ${info}%y${reset}"
diff --git a/include/conflicts b/include/conflicts
index 7bfca11..ef028d2 100755
--- a/include/conflicts
+++ b/include/conflicts
@@ -1,5 +1,11 @@
#!/usr/bin/env zsh
## vim:ft=zsh
+## Look for conflicting aliases and commands in ~/bin
+## Since aliases are usually loaded from zshrc, which is not sourced
+## for zsh script execution, the recommended usage is
+## source .../conflicts
+## in a running, interactive zsh
+
autoload check_com
typeset file dir alias
typeset PDIR=$HOME/packages