Created
October 12, 2016 15:48
Star
You must be signed in to star a gist
gogo jline scr completion
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
__scr_components = { | |
components = new ArrayList | |
try { | |
refs = ($.context getAllServiceReferences null "(objectClass=org.osgi.service.component.runtime.ServiceComponentRuntime)") | |
each $refs { | |
ref = $it | |
scr = ($.context getService $ref) | |
each ($scr componentDescriptionDTOs) { | |
$components add ((($it class) field "name") get $it) | |
} | |
$.context ungetService $ref | |
} | |
} | |
$components | |
} | |
complete -c scr:list -e | |
complete -c scr:list -d "List component configurations" | |
complete -c scr:info -e | |
complete -c scr:info -d "Dump information of a component or component configuration" | |
complete -c scr:info -a '__scr_components' | |
complete -c scr:config -e | |
complete -c scr:config -d "Show the current SCR configuration" | |
complete -c scr:enable -e | |
complete -c scr:enable -d "Enable a disabled component" | |
complete -c scr:enable -a '__scr_components' | |
complete -c scr:disable -e | |
complete -c scr:disable -d "Disable an enabled component" | |
complete -c scr:disable -a '__scr_components' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment