From 8a2e1006b3b272126332aa064f3ad95387129544 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Thu, 13 Feb 2025 14:13:49 +0530 Subject: new dot files --- .config/zsh/oh-my-zsh/plugins/charm/README.md | 9 +++++++++ .config/zsh/oh-my-zsh/plugins/charm/charm.plugin.zsh | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .config/zsh/oh-my-zsh/plugins/charm/README.md create mode 100644 .config/zsh/oh-my-zsh/plugins/charm/charm.plugin.zsh (limited to '.config/zsh/oh-my-zsh/plugins/charm') diff --git a/.config/zsh/oh-my-zsh/plugins/charm/README.md b/.config/zsh/oh-my-zsh/plugins/charm/README.md new file mode 100644 index 0000000..f237dce --- /dev/null +++ b/.config/zsh/oh-my-zsh/plugins/charm/README.md @@ -0,0 +1,9 @@ +# Charm plugin + +This plugin adds completion for the [charm](https://github.com/charmbracelet/charm) CLI. + +To use it, add `charm` to the plugins array in your zshrc file: + +```zsh +plugins=(... charm) +``` diff --git a/.config/zsh/oh-my-zsh/plugins/charm/charm.plugin.zsh b/.config/zsh/oh-my-zsh/plugins/charm/charm.plugin.zsh new file mode 100644 index 0000000..52361ce --- /dev/null +++ b/.config/zsh/oh-my-zsh/plugins/charm/charm.plugin.zsh @@ -0,0 +1,14 @@ +# Autocompletion for the Charm CLI (charm). +if (( ! $+commands[charm] )); then + return +fi + +# If the completion file doesn't exist yet, we need to autoload it and +# bind it to `charm`. Otherwise, compinit will have already done that. +if [[ ! -f "$ZSH_CACHE_DIR/completions/_charm" ]]; then + typeset -g -A _comps + autoload -Uz _charm + _comps[charm]=_charm +fi + +charm completion zsh >| "$ZSH_CACHE_DIR/completions/_charm" &| -- cgit v1.2.3-59-g8ed1b