mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
chore(juju): remove zstyle defaults and unnecessary import
This commit is contained in:
parent
9b9a793abd
commit
535e2d70ec
2 changed files with 2 additions and 21 deletions
|
|
@ -167,11 +167,6 @@ _juju()
|
||||||
__juju_debug "[_juju] curcontext: ${curcontext}"
|
__juju_debug "[_juju] curcontext: ${curcontext}"
|
||||||
local -a completions
|
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"
|
__juju_debug "[_juju] words: ${words[*]}, CURRENT: $CURRENT"
|
||||||
|
|
||||||
# Find the subcommand: first non-flag word typed after "juju", excluding the
|
# Find the subcommand: first non-flag word typed after "juju", excluding the
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,5 @@
|
||||||
# ---------------------------------------------------------- #
|
# ---------------------------------------------------------- #
|
||||||
# Aliases and functions for juju (https://juju.is) #
|
# 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, #
|
# Generally, #
|
||||||
# - `!` means --force --no-wait -y #
|
# - `!` means --force --no-wait -y #
|
||||||
|
|
@ -168,7 +154,7 @@ jreld() {
|
||||||
|
|
||||||
# Return Juju current controller
|
# Return Juju current controller
|
||||||
jcontroller() {
|
jcontroller() {
|
||||||
local file=${JUJU_DATA:=~/.local/share/juju}/controllers.yaml
|
local file="${JUJU_DATA:-$HOME/.local/share/juju}/controllers.yaml"
|
||||||
[[ -f "$file" ]] || return 1
|
[[ -f "$file" ]] || return 1
|
||||||
|
|
||||||
local controller="$(awk '/current-controller/ {print $2}' "$file")"
|
local controller="$(awk '/current-controller/ {print $2}' "$file")"
|
||||||
|
|
@ -180,7 +166,7 @@ jcontroller() {
|
||||||
|
|
||||||
# Return Juju current model
|
# Return Juju current model
|
||||||
jmodel() {
|
jmodel() {
|
||||||
local file=${JUJU_DATA:=~/.local/share/juju}/models.yaml
|
local file="${JUJU_DATA:-$HOME/.local/share/juju}/models.yaml"
|
||||||
[[ -f "$file" ]] || return 1
|
[[ -f "$file" ]] || return 1
|
||||||
|
|
||||||
local yqbin="$(whereis yq | awk '{print $2}')"
|
local yqbin="$(whereis yq | awk '{print $2}')"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue