-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#=========================================================================== | ||
# bosh cli completion | ||
# This script is installed in "/etc/bash_completion.d/" | ||
#=========================================================================== | ||
|
||
_bosh2() { | ||
#--- Catch all arguments except the first one | ||
args=("${COMP_WORDS[@]:1:$COMP_CWORD}") | ||
|
||
#--- Only split on newlines | ||
local IFS=$'\n' | ||
|
||
#--- Call completion (first element of COMP_WORDS is the executable itself) | ||
COMPREPLY=($(GO_FLAGS_COMPLETION=1 ${COMP_WORDS[0]} "${args[@]}")) | ||
return 0 | ||
} | ||
|
||
complete -o default -F _bosh2 bosh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters