From 0d469f698970050bb0a1379a69d429befa78de1d Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 1 Dec 2023 14:34:58 +0100 Subject: [PATCH] Fix bad errors --- nushell/config/docker.nu | 4 ++-- nushell/env.nu | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nushell/config/docker.nu b/nushell/config/docker.nu index 60f4a66..3e6f740 100644 --- a/nushell/config/docker.nu +++ b/nushell/config/docker.nu @@ -58,8 +58,8 @@ def --env kube [name?: string@_kube_kubes] { alias kns = k9s -n all # k9s shortcut for each cluster -alias zeus = k9s --kubeconfig ($env.HOME + '/.kubes/zeus/config') -alias safir = k9s --kubeconfig ($env.HOME + '/.kubes/safir/config') +alias zeus = k9s -n all --kubeconfig ($env.HOME + '/.kubes/zeus/config') +alias safir = k9s -n all --kubeconfig ($env.HOME + '/.kubes/safir/config') # start minikube with test kube def "minikube start" [] { diff --git a/nushell/env.nu b/nushell/env.nu index cb9f54d..cf7c994 100644 --- a/nushell/env.nu +++ b/nushell/env.nu @@ -74,8 +74,9 @@ def create_left_prompt [] { # Current kube let kube_color = ansi cyan_bold - let kube = if ("~/.kubes/current-cube" | path exists) { - let kube_name = open ~/.kubes/current-cube | path dirname | path basename + + let kube = if ("KUBECONFIG" in $env) { + let kube_name = $env.KUBECONFIG | path dirname | path basename [$kube_color, " ‹", $kube_name, "›"] | str join } else {