bash-completion

kubectl 自动补全命令

笑着哭i 提交于 2021-02-13 08:46:09
1.安装bash-completion工具 yum install bash-completion -y 否则报错: -bash: _get_comp_words_by_ref: command not found 2.执行bash_completion source /usr/share/bash-completion/bash_completion 3.加载kubectl completion source <(kubectl completion bash) # 在 bash 中设置当前 shell 的自动补全,要先安装 bash-completion 包。 echo "source <(kubectl completion bash)" >> ~/.bashrc # 在您的 bash shell 中永久的添加自动补全 您还可以为 kubectl 使用一个速记别名,该别名也可以与 completion 一起使用: alias k=kubectl complete -F __start_kubectl k 参考: https://kubernetes.io/zh/docs/reference/kubectl/cheatsheet/ 原文出处:https://www.cnblogs.com/Dev0ps/p/12186027.html 来源: oschina 链接: https:

VMware安装CentOS7.5

China☆狼群 提交于 2021-02-12 04:47:34
虚拟机配置: 选择安装方式: 第一行:安装CentOS 7; 第二行:测试这个媒体并安装CentOS 7; 第三行:故障排除; Tips: CentOS 7与CentOS 6网卡名称命名方式有所改变,如果需要CentOS 7与CentOS 6的网卡名称一样,操作步骤如下: 1) 选择第一个安装方式,并按下tab键,如下图片所示; 2) 输入net.ifnames=0 biosdevname=0,如下图所示: 选择语言: 这里直接选择中文,安装配置方便; 配置系统安装信息: Tips: 本地化可以忽略; 语言选择英文的注意更改时区为上海,不然会出现其他时区时间; 修改顺序如下: 配置系统分区: Tips: 推荐使用自定义分区设置,具体可根据实际情况更改; /boot分区1G; swap分区1G; / 分区:剩余全部空间; 分区配置好如下图: Tips: CentOS 7.x文件系统采用的是xfs,检查是否为xfs; CentOS 6.x文件系统采用的是ext4; swap不用更改文件系统; 接受分区更改; 关闭KDUMP: Tips:在虚拟机中这个功能有些鸡肋,还会拖慢虚拟机,而且虚拟机有快照功能,玩坏了恢复快照即可; 配置网卡信息: 修改虚拟机的虚拟网卡信息,这样虚拟机就可以上外网了; 选择VMnet8,关闭DHCP服务; 修改主机名和配置第一块网卡,如下图: 配置好后

Nested bash autocompletion script

懵懂的女人 提交于 2021-02-07 10:36:03
问题 I've been trying to add bash completion support to a command line program I've been using lately, but it seems that I've hit a wall. Here are the commands and subcommands I'd like to auto-complete Main command is foo , autocompletion should be performed for the subcommands version , process , and help . Further autcompletion depends on the subcommand. If the user enters - after the main command, autocompletion performs completion for these word: --activate or --deactivate If the user enters -

Nested bash autocompletion script

我与影子孤独终老i 提交于 2021-02-07 10:35:25
问题 I've been trying to add bash completion support to a command line program I've been using lately, but it seems that I've hit a wall. Here are the commands and subcommands I'd like to auto-complete Main command is foo , autocompletion should be performed for the subcommands version , process , and help . Further autcompletion depends on the subcommand. If the user enters - after the main command, autocompletion performs completion for these word: --activate or --deactivate If the user enters -

「Docker Compose」- 配置 Bash 补全(Bash Completion) @20210123

坚强是说给别人听的谎言 提交于 2021-01-23 23:49:46
问题描述 在 Bash 中,配置 Docker Compose 补全,可以简化输入工作、提高输入准确性。 解决方案 第一步、确保已经安装 Bash Completion 功能; 第二步、安装自动补全: curl -L https://raw.githubusercontent.com/docker/compose/1.27.4/contrib/completion/bash/docker-compose \ -o ~/.local/share/bash-completion/completions/ 参考文献 WikiNotes/配置 Bash 补全(Bash Completion) Command-line completion | Docker Documentation 来源: oschina 链接: https://my.oschina.net/u/4948974/blog/4921824

Git tab completion not working in zsh on mac

不问归期 提交于 2020-11-30 02:45:09
问题 No matter what I try and do I can't seem to make git tab/auto completion work in my zsh shell. I've downloaded the bash-completion script and the zsh-completion one and followed the instructions, but I can't make it work. I've reinstalled oh-my-zsh but that didn't seem to help or make any difference. Can anyone who's got it working describe to me their setup so I can try an emulate it to get it working for me? To be specific, what I've done so far is: Switched to using zsh as my default shell

Git tab completion not working in zsh on mac

妖精的绣舞 提交于 2020-11-30 02:44:23
问题 No matter what I try and do I can't seem to make git tab/auto completion work in my zsh shell. I've downloaded the bash-completion script and the zsh-completion one and followed the instructions, but I can't make it work. I've reinstalled oh-my-zsh but that didn't seem to help or make any difference. Can anyone who's got it working describe to me their setup so I can try an emulate it to get it working for me? To be specific, what I've done so far is: Switched to using zsh as my default shell

ubuntu使用nvm安装nodejs、npm

这一生的挚爱 提交于 2020-11-23 09:57:35
我使用的都是elementary os这个系统,内核是Ubuntu18.0.4 nvm github:https://github.com/creationix/nvm 1.下载nvm wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 2.复制提示内容运行 export NVM_DIR="$HOME/.nvm"  [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm   [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion 3.确认nvm command -v nvm 4.安装nodejs(nodejs已经集成npm) nvm install node 5.检查nodejs、npm版本,确认安装成功 node --version npm -v 6.完成以上步骤你当前可用,第二天重新打开电脑就不行了,因为你只设置了当前环境 可以在~/.profile、 ~/.bashrc 、~/.zshrc 配置里边根据需要加上以下配置项

linux 安装 git 以及命令补全

北城以北 提交于 2020-10-16 12:59:20
大家都知道 linux 使用命令,可以通过 tab 键来补全命令, 而安装 git 也可以安装相关的命令补全,这样在操作一些很长的分支名,就非常方便, 安装命令如下: sudo yum install git bash-completion 参考: Install Bash git completion 来源: oschina 链接: https://my.oschina.net/u/4324660/blog/4302650