10 lines
207 B
Bash
Executable file
10 lines
207 B
Bash
Executable file
#!/usr/bin/env sh
|
|
kubectl config get-contexts --no-headers | \
|
|
uniq | \
|
|
sort | \
|
|
tr -s ' ' | \
|
|
sed -E 's/^\*?[[:space:]]*//g' | \
|
|
cut -d ' ' -f1 | \
|
|
fzf | \
|
|
xargs -I{} kubectl config use-context '{}'
|