summaryrefslogtreecommitdiff
path: root/.config/zsh/oh-my-zsh/plugins/spring/_spring
diff options
context:
space:
mode:
authorPedro Pereira <pedro.hr.pereira@proton.me>2026-10-16 15:19:13 -0300
committerPedro Pereira <pedro.hr.pereira@proton.me>2026-10-16 15:19:13 -0300
commit1eb69e9a795cc19450178c07d8d382622bc7ad70 (patch)
treeb6bc60605044fe929986f31b3b6bf4fee9b56e14 /.config/zsh/oh-my-zsh/plugins/spring/_spring
first commit
Diffstat (limited to '.config/zsh/oh-my-zsh/plugins/spring/_spring')
-rw-r--r--.config/zsh/oh-my-zsh/plugins/spring/_spring29
1 files changed, 29 insertions, 0 deletions
diff --git a/.config/zsh/oh-my-zsh/plugins/spring/_spring b/.config/zsh/oh-my-zsh/plugins/spring/_spring
new file mode 100644
index 0000000..93f1951
--- /dev/null
+++ b/.config/zsh/oh-my-zsh/plugins/spring/_spring
@@ -0,0 +1,29 @@
+#compdef spring 'spring'
+#autoload
+
+_spring() {
+
+ local cword
+ let cword=CURRENT-1
+
+ local hints
+ hints=()
+
+ local reply
+ while read -r line; do
+ reply=`echo "$line" | awk '{printf $1 ":"; for (i=2; i<NF; i++) printf $i " "; print $NF}'`
+ hints+=("$reply")
+ done < <(spring hint ${cword} ${words[*]})
+
+ if ((cword == 1)) {
+ _describe -t commands 'commands' hints
+ return 0
+ }
+
+ _describe -t options 'options' hints
+ _files
+
+ return 0
+}
+
+_spring "$@" \ No newline at end of file