mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-06-01 03:45:59 +00:00
simplify argument processing in kubectx
This commit is contained in:
parent
45791dad13
commit
afc74a0ce0
5
kubectx
5
kubectx
@ -224,8 +224,6 @@ main() {
|
||||
usage "missing context NAME"
|
||||
fi
|
||||
delete_contexts "${@:2}"
|
||||
elif [[ "$#" -gt 1 ]]; then
|
||||
usage "too many arguments"
|
||||
elif [[ "$#" -eq 1 ]]; then
|
||||
if [[ "${1}" == "-" ]]; then
|
||||
swap_context
|
||||
@ -246,8 +244,7 @@ main() {
|
||||
set_context "${1}"
|
||||
fi
|
||||
else
|
||||
usage
|
||||
exit 1
|
||||
usage "too many arguments"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user