Add -s auto-complete option

Add -s auto-complete option.
This commit is contained in:
Anima C13 2022-10-07 11:23:59 -03:00 committed by GitHub
parent 72ba913324
commit c8407abdf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,11 @@ _scrcpy() {
COMPREPLY=($(compgen -W 'verbose debug info warn error' -- "$cur"))
return
;;
-s|--serial)
# Use 'adb devices' to list serial numbers.
COMPREPLY=($(compgen -W "$(adb devices | awk '/(device|recovery|sideload)$/{print $1}')" -- ${cur} ) )
return
;;
-b|--bitrate \
|--codec-options \
|--crop \
@ -103,7 +108,6 @@ _scrcpy() {
|-m|--max-size \
|-p|--port \
|--push-target \
|-s|--serial \
|--tunnel-host \
|--tunnel-port \
|--v4l2-buffer \