From 2a99e472e16e1e3f37156012436f30b9af547ca6 Mon Sep 17 00:00:00 2001 From: Moshe Beladev Date: Tue, 19 Jan 2021 22:41:21 +0200 Subject: [PATCH] add gebug plugin --- plugins/gebug/README.md | 10 ++++++++++ plugins/gebug/gebug.plugin.zsh | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 plugins/gebug/README.md create mode 100644 plugins/gebug/gebug.plugin.zsh diff --git a/plugins/gebug/README.md b/plugins/gebug/README.md new file mode 100644 index 000000000..ba425a9c7 --- /dev/null +++ b/plugins/gebug/README.md @@ -0,0 +1,10 @@ +# Gebug plugin + +This plugin adds completion for [Gebug](https://github.com/moshebe/gebug), the tool that make debugging of Dockerized Go applications super easy by enabling Debugger and Hot-Reload features. + +To use it, add `gebug` to the plugins array in your zshrc file: + +```zsh +plugins=(... gebug) +``` + diff --git a/plugins/gebug/gebug.plugin.zsh b/plugins/gebug/gebug.plugin.zsh new file mode 100644 index 000000000..6ed1e6f39 --- /dev/null +++ b/plugins/gebug/gebug.plugin.zsh @@ -0,0 +1,14 @@ +# Autocompletion for Gebug. +# +if (( $+commands[gebug] )); then + __GEBUG_COMPLETION_FILE="${ZSH_CACHE_DIR}/gebug_completion" + + if [[ ! -f $__GEBUG_COMPLETION_FILE ]]; then + gebug completion zsh >! $__GEBUG_COMPLETION_FILE + fi + + [[ -f $__GEBUG_COMPLETION_FILE ]] && source $__GEBUG_COMPLETION_FILE + + unset __GEBUG_COMPLETION_FILE +fi +