zoukankan      html  css  js  c++  java
  • 三、kubectl命令补全

    [root@k8s-master01 k8s]# yum install -y bash-completion
    [root@k8s-master01 k8s]# source /usr/share/bash-completion/bash_completion
    
    
    # source <(kubectl completion bash)

    就可以完成补全了。
    可以将 source <(kubectl completion bash) 命令 写入 $HOME/.bashrc中.

    [root@k8s-master01 k8s]# cat $HOME/.bashrc
    # .bashrc
    
    # User specific aliases and functions
    
    alias rm='rm -i'
    alias cp='cp -i'
    alias mv='mv -i'
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
            . /etc/bashrc
    fi
    source <(kubectl completion bash)
    
    
    [root@k8s-master01 k8s]# source $HOME/.bashrc
  • 相关阅读:
    python-04
    python-03
    python-02
    python-01
    day4-RHCS
    python 之元组(tuple)
    11.21
    python之猜数小游戏
    python之简陋的数据库
    11.20
  • 原文地址:https://www.cnblogs.com/xw115428/p/11956568.html
Copyright © 2011-2022 走看看