Repository navigation
add shell completions for all versions - #3012
hltdev8642 wants to merge 5 commits into
Conversation
|
Hi, thank you, there was even a feature request for that: #2930 😉 Remarks:
@yangfl is there a specific format required by Debian? |
|
AFAIK there's no such specification. But seems these completions are for zsh and, of course we can ship them into (Disclaimer: I use zsh too.) |
Correct. They are identical except for So basically yes, you could potentially merge them but it would only trigger for either the
as @yangfl said it is a zsh completion 😉 . |
(after a quick look, it's not clear to me how to, but it looks possible)
That would be great 👍 Thank you :) |
|
@rom1v, I got the zsh one working in a single file thanks to that link you sent me , and have pushed the changes 👍 😄 👍. @yangfl Best, |
|
I squashed your commits into a single one, then applied the following changes:
The resulting commit is here: Please review :) |
|
(FYI, I started working on a bash completion script yesterday, I will continue tonight or tomorrow.) |
|
I fixed the completion of parameters: For example: |
Oh, sorry, I missed the part where you actually started working on it (I thought you just planned to).
I finalized my script yesterday evening, I planned to open a PR after this one is merged, but I can share it here: Could you share a branch of your current bash script, please? Maybe there are possible improvements on both. Thank you. |
looks great, nice job! 👍 😄 👍
Sure, I just finished it, pretty basic but does work nonetheless! Note that I don't have a ton of experience with branch-related tasks using git, so hopefully I did this correctly... |
Thank you, merged 👍 2695378
Thank you. I took the same example as yours initially, but it did not work correctly both with and without
I submitted a PR for my bash completion script: #3048. I will publish a new release soon (v1.23), so I will merge it just before. |
scrcpy v1.23 Changes since v1.22: - Add HID/OTG support for Windows (--otg only) (Genymobile#2773, Genymobile#3011) - Add HID/OTG support for macOS (Genymobile#2774, Genymobile#3031) - Improve device selection (list devices, -d, -e) (Genymobile#3005) - Downscale and retry on MediaCodec error in more cases (Genymobile#2990, Genymobile#3043) - Add ZSH completion script (Genymobile#3012) - Add Bash completion script (Genymobile#2930, Genymobile#3048) - Add --no-cleanup option (Genymobile#1764, Genymobile#3020) - Add --printf-fps (Genymobile#468, Genymobile#3030) - Print both compiled and linked version of libs on --version - Fix FPS counter (broken in v1.22) - Various technical refactors and fixes
PR Genymobile#3012 <Genymobile#3012> Signed-off-by: Romain Vimont <rom@rom1v.com>
PR Genymobile#3012 <Genymobile#3012> Signed-off-by: Romain Vimont <rom@rom1v.com>
Created completion files by hand, paraphrasing description/value fields to make them a suitable length to be displayed in terminal (singleline).
Not sure exactly where these would be put within the repo, so I made a completions directory for the time being to place the files.
Hope this may be a helpful contribution, as I always wanted a completion file but couldn't find one or autogenerate it properly (so decided to make it by hand).
Best,
Jared (hltdev)