summary refs log tree commit diff stats
path: root/tag-zplug
diff options
context:
space:
mode:
Diffstat (limited to 'tag-zplug')
-rw-r--r--tag-zplug/config/zsh/zshenv0
-rw-r--r--tag-zplug/config/zsh/zshrc64
-rw-r--r--tag-zplug/zshenv3
3 files changed, 67 insertions, 0 deletions
diff --git a/tag-zplug/config/zsh/zshenv b/tag-zplug/config/zsh/zshenv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tag-zplug/config/zsh/zshenv
diff --git a/tag-zplug/config/zsh/zshrc b/tag-zplug/config/zsh/zshrc
new file mode 100644
index 0000000..dc55d6d
--- /dev/null
+++ b/tag-zplug/config/zsh/zshrc
@@ -0,0 +1,64 @@
+# -*- mode: sh; -*-
+export ZPLUG_HOME=/usr/local/opt/zplug
+source $ZPLUG_HOME/init.zsh
+
+zplug "zsh-users/zsh-completions"
+zplug "mafredri/zsh-async"
+zplug "sindresorhus/pure"
+zplug "Tarrasch/zsh-autoenv", as:plugin
+zplug "clvv/fasd", hook-build:"make install"
+zplug "tymm/zsh-directory-history", as:command, use:"dir{hist,log}"
+zplug "tymm/zsh-directory-history", as:plugin
+
+if zplug check Tarrasch/zsh-autoenv
+then
+	AUTOENV_FILE_ENTER=.envrc
+	AUTOENV_HANDLE_LEAVE=0
+	AUTOENV_LOOK_UPWARDS=1
+fi
+
+# Then, source plugins and add commands to $PATH
+zplug load
+
+# General configuration
+setopt auto_cd 					# Change directories without `cd`
+
+if zplug check zsh-users/zsh-completions
+then
+	autoload -U compinit && compinit
+fi
+
+if zplug check sindresorhus/pure
+then
+	PURE_GIT_PULL=0
+	autoload -Uz promptinit && promptinit
+	prompt pure &> /dev/null
+fi
+
+if zplug check clvv/fasd
+then
+	if [[ -n $commands[fasd] ]]
+	then
+		_FASD_DATA="$HOME/.cache/zsh/fasd-data"
+		source =fasd
+
+		fasd_cache="$HOME/.fasd-init-zsh"
+		if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
+			fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install >| "$fasd_cache"
+		fi
+		source "$fasd_cache"
+		unset fasd_cache
+	else
+		echo "no fasd"
+	fi
+fi
+
+if zplug check tymm/zsh-directory-history
+then
+	unsetopt flow_control 			# Let me use ^S and ^Q
+	# bindkey '\e[A' directory-history-search-backward
+	# bindkey '\e[B' directory-history-search-forward
+
+	bindkey -M emacs '^R' history-substring-search-up
+	bindkey -M emacs '^S' history-substring-search-down
+fi
diff --git a/tag-zplug/zshenv b/tag-zplug/zshenv
new file mode 100644
index 0000000..354c54d
--- /dev/null
+++ b/tag-zplug/zshenv
@@ -0,0 +1,3 @@
+ZDOTDIR="${XDG_CONFIG_HOME:=$HOME/.config}/zsh"
+
+source "$ZDOTDIR"/.zshenv