chore(juju): remove zstyle defaults and unnecessary import

This commit is contained in:
Iyigun Cevik 2026-05-27 12:17:19 +02:00
commit 535e2d70ec
No known key found for this signature in database
GPG key ID: 254FDC0AD54E6E84
2 changed files with 2 additions and 21 deletions

View file

@ -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

View file

@ -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 <TAB>). 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}')"