博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Docker自动补全容器名
阅读量:5126 次
发布时间:2019-06-13

本文共 1201 字,大约阅读时间需要 4 分钟。

Zsh

  1. Place the completion script in your /path/to/zsh/completion (typically ~/.zsh/completion/):
    下载自动完成文件
mkdir -p ~/.zsh/completioncurl -L https://raw.githubusercontent.com/docker/compose/1.21.0/contrib/completion/zsh/_docker-compose > ~/.zsh/completion/_docker-compose
  1. Include the directory in your $fpath by adding in ~/.zshrc:
    ~/.zshrc中加入
fpath=(~/.zsh/completion $fpath)
  1. Make sure compinit is loaded or do it by adding in ~/.zshrc:
    确保已经加载compinit,或加入到~/.zshrc
autoload -Uz compinit && compinit -i
  1. Then reload your shell:
    重新载入Shell
exec $SHELL -l

Available completions

Depending on what you typed on the command line so far, it completes:

  • available docker-compose commands
  • options that are available for a particular command
  • service names that make sense in a given context, such as services with running or - stopped instances or services based on images vs. services based on Dockerfiles. For docker-compose scale, completed service names automatically have “=” appended.
  • arguments for selected options. For example, docker-compose kill -s completes some signals like SIGHUP and SIGUSR1.
    Enjoy working with Compose faster and with less typos!

转载于:https://www.cnblogs.com/zhuxiaoxi/p/8972980.html

你可能感兴趣的文章
单元测试原来是这样的呼
查看>>
字符串
查看>>
给lnmp一键包中的nginx安装openresty的lua扩展
查看>>
cogs 547:[HAOI2011] 防线修建
查看>>
WebForm
查看>>
nginx 编译安装
查看>>
1001 A+B Format (20 分)
查看>>
while中的break
查看>>
tomcat 访问去掉项目名 直接访问 localhsot
查看>>
C#委托的介绍(delegate、Action、Func、predicate)
查看>>
hbase rest api接口链接管理【golang语言版】
查看>>
IOS的七种手势
查看>>
hadoop中map和reduce的数量设置问题
查看>>
剑指offer
查看>>
Mdi悬浮子窗体不超过主窗体边界
查看>>
再论递归
查看>>
[给ASP.NET 初学者的话]不要练功练了三年,才发现自己必须「砍掉重练」!....学习ASP.NET之前,请先把自己杯中的水倒掉...
查看>>
集合框架(一) ----------Map集合遍历的方法
查看>>
2015.5.21 Core Java Volume 1
查看>>
InnoDB还是MyISAM?
查看>>