]> git.sev.monster Git - dotfiles.git/commitdiff
zsh: add basic plugin system, add evil-registers
authorsev <git@sev.monster>
Fri, 18 Oct 2024 04:53:28 +0000 (23:53 -0500)
committersev <git@sev.monster>
Fri, 18 Oct 2024 05:00:43 +0000 (00:00 -0500)
.gitmodules
etc/zsh/.zlogin
etc/zsh/.zlogout
etc/zsh/.zprofile
etc/zsh/.zshenv
etc/zsh/.zshrc
etc/zsh/functions/Misc/load-plugins [new file with mode: 0644]
etc/zsh/plugins/zshrc/evil-registers [new submodule]

index 8951e4c11e22b52e271ee5456b0a0ece7b1e3faf..e0303ba35f2715b53429a2ba5b08c70f0ff250d7 100644 (file)
@@ -16,3 +16,6 @@
 [submodule "editorconfig-vim"]
        path = etc/vim/pack/editorconfig-vim/start/editorconfig-vim
        url = https://github.com/editorconfig/editorconfig-vim.git
+[submodule "etc/zsh/plugins/evil-registers"]
+       path = etc/zsh/plugins/zshrc/evil-registers
+       url = https://github.com/zsh-vi-more/evil-registers
index e6499359c85b1c3d02e40753670bb282a7c93cd8..f8458255af7f3a329d02801b0a56c9a8aad6b11b 100644 (file)
@@ -1,5 +1,8 @@
 # NOTE: all logic here moved to .zprofile, see comments there for rationale
 
+### plugins
+load-plugins zlogin
+
 ### load site-specific
 load-site-dotfile zlogin
 
index 8ab31d138c2edad82ff9c6578d58bd722a844e57..749c309519ee80ba081995f7ab7d115136412e15 100644 (file)
@@ -40,5 +40,8 @@ if [[ -o interactive ]] {
     echo logout
 }
 
+### plugins
+load-plugins zlogout
+
 ### load site-specific
 load-site-dotfile zlogout
index 170f4de957381725506604436f8cc46078b5d547..38b34c53b445360a87f4bf8a9406dac8cec12d68 100644 (file)
@@ -221,5 +221,8 @@ if [[ ! -v _sev_setup_ssh ]] {
 }
 unfunction _gpg_socketpath
 
+### plugins
+load-plugins zprofile
+
 ### load site-specific
 load-site-dotfile zprofile
index 7a923e9929558cf175c27500aa131b6d37e04f54..37daf7fc58bceecc1c5f8c4dcf3cd918d9a53e40 100644 (file)
@@ -316,6 +316,10 @@ if [[ -v commands[go] ]] {
     [[ ! -v GOBIN  ]] && export GOBIN=~/.local/bin
 }
 
+### plugins
+autoload -Uz load-plugins
+load-plugins zshenv
+
 ### load zshenv site-specific
 autoload -Uz load-site-dotfile
 load-site-dotfile zshenv
index c0fdef951fe95957bd5b8ee6658aec61e9c5b568..90e15a0c6f6c0a675884aa662152bc9bca25d842 100644 (file)
@@ -411,5 +411,8 @@ esac
 autoload -Uz promptinit && promptinit
 prompt arrows
 
+### plugins
+load-plugins zshrc
+
 ### load site-specific
 load-site-dotfile zshrc
diff --git a/etc/zsh/functions/Misc/load-plugins b/etc/zsh/functions/Misc/load-plugins
new file mode 100644 (file)
index 0000000..8362049
--- /dev/null
@@ -0,0 +1,9 @@
+emulate -L zsh
+
+[[ -n $1 ]] || exit 1
+
+for p (${2:-${ZDOTDIR:-${_sev_home:-~/.zsh}}}/plugins/$1/*(N)) {
+    for f (${p:t}.{plugin.zsh,zsh,sh}) {
+        [[ -f $p$f ]] && source $p$f && break
+    }
+}
diff --git a/etc/zsh/plugins/zshrc/evil-registers b/etc/zsh/plugins/zshrc/evil-registers
new file mode 160000 (submodule)
index 0000000..220d903
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 220d903b5c3193a2da0ca97573bcc76be6a12d11
This page took 0.045874 seconds and 4 git commands to generate.