From 535e2d70ec5d6b1b30759ab1533effc035212cad Mon Sep 17 00:00:00 2001 From: Iyigun Cevik Date: Wed, 27 May 2026 12:17:19 +0200 Subject: [PATCH] chore(juju): remove zstyle defaults and unnecessary import --- plugins/juju/_juju | 5 ----- plugins/juju/juju.plugin.zsh | 18 ++---------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/plugins/juju/_juju b/plugins/juju/_juju index 83dc505fa..4e08ba6ad 100644 --- a/plugins/juju/_juju +++ b/plugins/juju/_juju @@ -167,11 +167,6 @@ _juju() __juju_debug "[_juju] curcontext: ${curcontext}" local -a completions - # Must be set at completion time (not just at sourcing time) so the - # completion system picks it up when rendering groups. - zstyle ':completion:*' group-name '' - zstyle ':completion::complete:juju:*' format '%B%d%b' - __juju_debug "[_juju] words: ${words[*]}, CURRENT: $CURRENT" # Find the subcommand: first non-flag word typed after "juju", excluding the diff --git a/plugins/juju/juju.plugin.zsh b/plugins/juju/juju.plugin.zsh index 43ed76bac..a7bd98d7e 100644 --- a/plugins/juju/juju.plugin.zsh +++ b/plugins/juju/juju.plugin.zsh @@ -1,19 +1,5 @@ # ---------------------------------------------------------- # # Aliases and functions for juju (https://juju.is) # -# ---------------------------------------------------------- # - -# Load TAB completions -source "${0:A:h}/_juju" - -# group-name '' enables visual separation between completion groups (e.g. models -# vs controllers in juju switch ). This is a safe global setting that -# improves completion display for all commands. -zstyle ':completion:*' group-name '' -# Show group headers only for juju completions. -zstyle ':completion::complete:juju:*' format '%B%d%b' - -# ---------------------------------------------------------- # -# Aliases (in alphabetic order) # # # # Generally, # # - `!` means --force --no-wait -y # @@ -168,7 +154,7 @@ jreld() { # Return Juju current controller jcontroller() { - local file=${JUJU_DATA:=~/.local/share/juju}/controllers.yaml + local file="${JUJU_DATA:-$HOME/.local/share/juju}/controllers.yaml" [[ -f "$file" ]] || return 1 local controller="$(awk '/current-controller/ {print $2}' "$file")" @@ -180,7 +166,7 @@ jcontroller() { # Return Juju current model jmodel() { - local file=${JUJU_DATA:=~/.local/share/juju}/models.yaml + local file="${JUJU_DATA:-$HOME/.local/share/juju}/models.yaml" [[ -f "$file" ]] || return 1 local yqbin="$(whereis yq | awk '{print $2}')"