feat: kx instead of kn for simplicity
This commit is contained in:
parent
6ccce87f1a
commit
8ff07de964
@ -1 +1 @@
|
|||||||
Subproject commit 27932494bcefac03497dd92dcf0c59a04c10d757
|
Subproject commit d4a85643a465f5fae2113d07d22d021d4af4795a
|
@ -1 +1 @@
|
|||||||
Subproject commit 2b802ab1e94d595ca5cc7c55f9d1fb9b17f9754c
|
Subproject commit a2817c9d9500079a0340286a88653b41707a92eb
|
@ -1 +1 @@
|
|||||||
Subproject commit 7a4ffef931769c3fe7544214ed7ffde5852653f6
|
Subproject commit 4d77743a8ec4d19b3c47e0d04f3e88f1a933698e
|
@ -1 +1 @@
|
|||||||
Subproject commit dc27512e0019dcf4b6fbf0e0d5f285b4c9858308
|
Subproject commit 1821c656d8e42fd8ce6648af58e64268606e8bec
|
@ -12,25 +12,17 @@
|
|||||||
# 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 kn() {
|
function kx() {
|
||||||
(set -e
|
1="$(echo - "$1" | tr -c '[:alnum:]-_' '[ *]')"
|
||||||
local ctx="${1%/*}"
|
local ctx="$(echo - "$1" | awk '{print $1}')"
|
||||||
local ns="$2"
|
local ns="${2-$(echo - "$1" | awk '{print $2}')}"
|
||||||
|
|
||||||
if [ -z "$ns" ] && [ "$ctx" != "$1" ]; then
|
kubectx ${ctx:l}
|
||||||
ns="${1#*/}"
|
[ -n "$ns" ] && kubens "${ns:l}"
|
||||||
fi
|
|
||||||
if [ -n "$ns" ]; then
|
|
||||||
kubectx "${ctx:l}"
|
|
||||||
else
|
|
||||||
ns="$ctx"
|
|
||||||
fi
|
|
||||||
kubens "${ns:l}"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
compdef -e _kubens.zsh kn
|
compdef -e _kubectx.zsh kx
|
||||||
|
|
||||||
alias kx='kubectx'
|
alias kn='kubens'
|
||||||
alias k='kubectl'
|
alias k='kubectl'
|
||||||
alias ksys='kubectl --namespace=kube-system'
|
alias ksys='kubectl --namespace=kube-system'
|
||||||
alias ka='kubectl apply --recursive -f'
|
alias ka='kubectl apply --recursive -f'
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 5ab517361a4215d2f777023fc1e772fe79496713
|
Subproject commit 1aa58d42a52b8fa39f16ad169fc405f276c36ae5
|
2
.pyenv
2
.pyenv
@ -1 +1 @@
|
|||||||
Subproject commit 4c261e6ea1a123e321a47b6c723ebd2603527e4d
|
Subproject commit 13d85686205e7a21f2aabd659ee96d34dd7a12b5
|
Loading…
Reference in New Issue
Block a user