feat: kxn and kns aliases
This commit is contained in:
parent
4fc13d3504
commit
89d4708de5
@ -1 +1 @@
|
|||||||
Subproject commit 94f992cd0571ddfee6a681ab50d8ac187236ed9b
|
Subproject commit 52415d6bbf462a14647392857ea637adc753c056
|
@ -1 +1 @@
|
|||||||
Subproject commit 4497678c6b1847b663c4b23000d55f28a2f846ce
|
Subproject commit dd640f6cfb0e370cfd3db389f04b172508848bd3
|
@ -1 +1 @@
|
|||||||
Subproject commit a3f17d3baf70df58b9d3544ea30abe52a7a832c2
|
Subproject commit 942fe5faef47b21241e970551eba407bc10d9547
|
@ -1 +1 @@
|
|||||||
Subproject commit cd436f92f65def9c7e74a7324d3eab422ef85643
|
Subproject commit c9ef5e58f7d59aba875324825ff47900d0be61f2
|
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
function kctx() {
|
function kxn() {
|
||||||
1="$(echo - "$1" | tr -c '[:alnum:]-_' '[ *]')"
|
1="$(echo - "$1" | tr -c '[:alnum:]-_' '[ *]')"
|
||||||
local ctx="$(echo - "$1" | awk '{print $1}')"
|
local ctx="$(echo - "$1" | awk '{print $1}')"
|
||||||
local ns="${2-$(echo - "$1" | awk '{print $2}')}"
|
local ns="${2-$(echo - "$1" | awk '{print $2}')}"
|
||||||
@ -20,6 +20,7 @@ function kctx() {
|
|||||||
kubectx ${ctx:l}
|
kubectx ${ctx:l}
|
||||||
[ -n "$ns" ] && kubens "${ns:l}"
|
[ -n "$ns" ] && kubens "${ns:l}"
|
||||||
}
|
}
|
||||||
|
compdef _kubectx kxn
|
||||||
|
|
||||||
alias kns='kubens'
|
alias kns='kubens'
|
||||||
alias k='kubectl'
|
alias k='kubectl'
|
||||||
|
@ -1176,7 +1176,7 @@
|
|||||||
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
||||||
# Show kubecontext only when the command you are typing invokes one of these tools.
|
# Show kubecontext only when the command you are typing invokes one of these tools.
|
||||||
# Tip: Remove the next line to always show kubecontext.
|
# Tip: Remove the next line to always show kubecontext.
|
||||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
|
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|kxn|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'
|
||||||
|
|
||||||
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
|
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
|
||||||
# different contexts.
|
# different contexts.
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 2aa16c54314f175e4f34fdd7fa1bdb03f1797c6a
|
Subproject commit cb9788b12a1fade6be631ad905928f9a5f7eb03f
|
@ -1 +1 @@
|
|||||||
Subproject commit 72732a224e886933df6b64a49ec6f5e94c884612
|
Subproject commit c08b925d282e35ea7bd9a8f4c29de2ece0debb49
|
Loading…
Reference in New Issue
Block a user