bash-completion

Docker 学习笔记

时光毁灭记忆、已成空白 提交于 2020-10-09 08:40:55
当我们只需 docker pull等操作的时候,默认都是从公共的仓库 docker hub上面进行下载。我们也可以设置自己的私有仓库 registry。下面简单的介绍一下两种常见的访问方式。 更多的详细解释参见 https://docs.docker.com/registry/ HTTP 方式 Registry的配置很简单 他本身就是一个服务,因此我们可以直接从容器启动 , 比如指定了一个名字registry,开放端口5000,挂载了一个宿主机的目录作为存放镜像的目录 docker run -d -p 5000:5000 --restart=always --name registry -v /opt/myregistry:/var/lib/registry registry 上传镜像就两步操作,第一打个标签,第二上传 docker tag busybox:1.29 172.16.1.150/busybox:1.29 docker push 172.16.1.150/busybox:1.29 默认情况下会报错,这是因为他默认会使用https的协议,而我们使用的http The push refers to repository [172.16.1.150/busybox] Get https://172.16.1.150/v2/: dial tcp 172.16.1.150:443

自动补全命令

妖精的绣舞 提交于 2020-09-29 11:00:45
很多时候类似:route 或者docker 以及其他服务的命令参数太多,无法记住,如果查帮助又不至于,就可以安装如下软件: yum install -y bash-completion 安装完成,退出重进下就可以了。 来源: oschina 链接: https://my.oschina.net/u/4335726/blog/4616544

docker与kubectl 命令自动补齐

半城伤御伤魂 提交于 2020-08-17 00:47:56
安装自动补齐需要依赖工具 yum install -y bash-completion docker命令补齐: 执行下列命令 sh /usr/share/bash-completion/bash_completion sh /usr/share/bash-completion/completions/docker      kubectl命令补齐: sh /usr/share/bash-completion/bash_completion source <(kubectl completion bash) echo "source <(kubectl completion bash)" >> ~/.bashrc #或者 echo "source <(kubectl completion bash)" >> /etc/profile    来源: oschina 链接: https://my.oschina.net/u/4305979/blog/4429323

Linux、k8s命令补全

孤街醉人 提交于 2020-08-07 09:25:23
1、Linux命令补全 1.安装补全yum包 yum -y install bash-completion 2.source使其生效 source /usr/share/bash-completion/bash_completion 2、k8s命令补全 yum -y install bash-completion source /usr/share/bash-completion/bash_completion source <(kubectl completion bash) echo "source <(kubectl completion bash)" >> ~/.bashrc 来源: oschina 链接: https://my.oschina.net/u/4323802/blog/4449084

How to use ls's bash-completion of specific directory for my bash command?

*爱你&永不变心* 提交于 2020-07-23 04:02:14
问题 I created a command memo as follows: memo() { vi $HOME/memo/$1 } I want to apply bash-completion to my memo to open files that is already in $HOME/memo directory: $ memo [TAB] # to show files in $HOME/memo $HOME/memo contains directory, so listing the file under memo is not sufficient. In other words, I want to apply what is used in ls command in $HOME/memo to memo : $ ls [TAB] foo.md bar/ I tried the below but it doesn't work for nested directories: _memo() { local cur local files _get_comp

How to use ls's bash-completion of specific directory for my bash command?

放肆的年华 提交于 2020-07-23 04:01:28
问题 I created a command memo as follows: memo() { vi $HOME/memo/$1 } I want to apply bash-completion to my memo to open files that is already in $HOME/memo directory: $ memo [TAB] # to show files in $HOME/memo $HOME/memo contains directory, so listing the file under memo is not sufficient. In other words, I want to apply what is used in ls command in $HOME/memo to memo : $ ls [TAB] foo.md bar/ I tried the below but it doesn't work for nested directories: _memo() { local cur local files _get_comp

How to use ls's bash-completion of specific directory for my bash command?

允我心安 提交于 2020-07-23 04:00:35
问题 I created a command memo as follows: memo() { vi $HOME/memo/$1 } I want to apply bash-completion to my memo to open files that is already in $HOME/memo directory: $ memo [TAB] # to show files in $HOME/memo $HOME/memo contains directory, so listing the file under memo is not sufficient. In other words, I want to apply what is used in ls command in $HOME/memo to memo : $ ls [TAB] foo.md bar/ I tried the below but it doesn't work for nested directories: _memo() { local cur local files _get_comp