feat: j tab
, podman->docker, kx->kctx, kn->kns
This commit is contained in:
parent
b6f60c0828
commit
90db24790e
5 changed files with 12 additions and 8 deletions
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
function kx() {
|
||||
function kctx() {
|
||||
1="$(echo - "$1" | tr -c '[:alnum:]-_' '[ *]')"
|
||||
local ctx="$(echo - "$1" | awk '{print $1}')"
|
||||
local ns="${2-$(echo - "$1" | awk '{print $2}')}"
|
||||
|
@ -20,9 +20,8 @@ function kx() {
|
|||
kubectx ${ctx:l}
|
||||
[ -n "$ns" ] && kubens "${ns:l}"
|
||||
}
|
||||
compdef -e _kubectx kx
|
||||
|
||||
alias kn='kubens'
|
||||
alias kns='kubens'
|
||||
alias k='kubectl'
|
||||
alias ksys='kubectl --namespace=kube-system'
|
||||
alias ka='kubectl apply --recursive -f'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue