Update 10.2.5. Command-line completion.md

master
qibaoguang 2015-03-15 23:05:30 +08:00
parent c9d913fcc6
commit aca97614d2
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
### 10.2.5. 命令行实现
Spring Boot CLI启动脚本为[BASH](http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29)和[zsh](http://en.wikipedia.org/wiki/Zsh) shells提供完整的命令行实现。你可以在任何shell中`source`脚本(名称也是`spring`或将它放到你个人或系统范围的bash实现初始化中。在一个Debian系统里系统范围的脚本位于`/shell-completion/bash`下当一个新的shell启动时该目录下的所有脚本都被执行。想要手动运行该脚本例如你已经使用`GVM`进行安装了:
```shell
$ . ~/.gvm/springboot/current/shell-completion/bash/spring
$ spring <HIT TAB HERE>
grab help jar run test version
```
**注**如果你使用Homebrew或MacPorts安装Spring Boot CLI命令行实现脚本会自动注册到你的shell。