spring_reference/II. Getting started/10.2.5. Command-line comple...

11 lines
835 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 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。