Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
077cd662
Commit
077cd662
authored
Nov 16, 2013
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add zsh shell completion script
parent
fe0dd8e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
INSTALL.txt
spring-boot-cli/src/main/content/INSTALL.txt
+9
-0
spring
...ng-boot-cli/src/main/content/shell-completion/bash/spring
+0
-0
_spring
...ng-boot-cli/src/main/content/shell-completion/zsh/_spring
+29
-0
No files found.
spring-boot-cli/src/main/content/INSTALL.txt
View file @
077cd662
...
...
@@ -26,6 +26,15 @@ set SPRING_HOME to point to a specific installation. You should also add SPRING
to your PATH environment variable.
Shell Completion
----------------
Shell auto-completion scripts are provided for BASH and ZSH. Add symlinks to the appropriate
location for your environment. For example, something like:
ln -s ./shell-completion/bash/spring /etc/bash_completion.d/spring
ln -s ./shell-completion/zsh/_spring /usr/local/share/zsh/site-functions/_spring
Checking Your Installation
--------------------------
To test if you have successfully install the CLI you can run the following command:
...
...
spring-boot-cli/src/main/content/
bash_completion.d
/spring
→
spring-boot-cli/src/main/content/
shell-completion/bash
/spring
View file @
077cd662
File moved
spring-boot-cli/src/main/content/shell-completion/zsh/_spring
0 → 100755
View file @
077cd662
#compdef spring 'spring'
#autoload
_spring() {
local cword
let cword=CURRENT-1
local hints
hints=()
local reply
while read -r line; do
reply=`echo "$line" | awk '{printf $1 ":"; for (i=2; i<NF; i++) printf $i " "; print $NF}'`
hints+=("$reply")
done < <(spring hint ${cword} ${words[*]})
if ((cword == 1)) {
_describe -t commands 'commands' hints
return 0
}
_describe -t options 'options' hints
_files
return 0
}
_spring "$@"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment