Skip to content

Commit

Permalink
Add -s auto-completion for bash
Browse files Browse the repository at this point in the history
Fixes #3522 <#3522>
PR #3523 <#3523>

Signed-off-by: Romain Vimont <[email protected]>
  • Loading branch information
animaone authored and rom1v committed Oct 12, 2022
1 parent 4064499 commit 1bfbade
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/data/bash-completion/scrcpy
Original file line number Diff line number Diff line change
Expand Up @@ -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:-adb}" devices | awk '$2 == "device" {print $1}')" -- ${cur}))
return
;;
-b|--bitrate \
|--codec-options \
|--crop \
Expand All @@ -103,7 +108,6 @@ _scrcpy() {
|-m|--max-size \
|-p|--port \
|--push-target \
|-s|--serial \
|--tunnel-host \
|--tunnel-port \
|--v4l2-buffer \
Expand Down

0 comments on commit 1bfbade

Please sign in to comment.