Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
2af2d1aa
"plugins/vscode:/vscode.git/clone" did not exist on "3f654922def6af96a07ce8d159567c61e1907e42"
Commit
2af2d1aa
authored
Dec 05, 2017
by
kg
Committed by
Robby Russell
Dec 04, 2017
Browse files
add autocomplete for adb -s option (#6121)
parent
e273cf00
Changes
2
Hide whitespace changes
Inline
Side-by-side
plugins/adb/README.md
View file @
2af2d1aa
# adb autocomplete plugin
# adb autocomplete plugin
*
Adds autocomplete options for all adb commands.
*
Adds autocomplete options for all adb commands.
*
Add autocomplete for
`adb -s`
## Requirements
## Requirements
...
...
plugins/adb/_adb
View file @
2af2d1aa
...
@@ -43,11 +43,20 @@ local expl
...
@@ -43,11 +43,20 @@ local expl
local -a pkgs installed_pkgs
local -a pkgs installed_pkgs
_arguments \
_arguments \
'-s[devices]:specify device:->specify_device' \
'*:: :->subcmds' && return 0
'*:: :->subcmds' && return 0
case "$state" in
specify_device)
_values 'devices' $(adb devices|awk 'NR>1&& $1 ~ /^[a-zA-Z0-9].*$/ \
{printf "%s[Device_%d:%s] ",$1,++i,$2 }')
return
;;
esac
if (( CURRENT == 1 )); then
if (( CURRENT == 1 )); then
_describe -t commands "adb subcommand" _1st_arguments
_describe -t commands "adb subcommand" _1st_arguments
return
return
fi
fi
_files
_files
\ No newline at end of file
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