From c8407abdf61e0340b443b7af3f5a60892f44fc7c Mon Sep 17 00:00:00 2001 From: Anima C13 <31348553+animaone@users.noreply.github.com> Date: Fri, 7 Oct 2022 11:23:59 -0300 Subject: [PATCH] Add -s auto-complete option Add -s auto-complete option. --- app/data/bash-completion/scrcpy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/data/bash-completion/scrcpy b/app/data/bash-completion/scrcpy index 3e75cbb0..c5105c7d 100644 --- a/app/data/bash-completion/scrcpy +++ b/app/data/bash-completion/scrcpy @@ -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 \