simplify argument processing in kubectx

This commit is contained in:
Ildar Shaimordanov 2022-11-25 00:42:34 +03:00
parent 45791dad13
commit afc74a0ce0

View File

@ -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
}