Skip to content

fix(xfreerdp): try --list-kbd as last resort #1380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion completions/xfreerdp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ _comp_cmd_xfreerdp__kbd_list()
kbd_list=$("$1" /list:kbd 2>/dev/null) ||
# Old syntax, deprecated in 2022-10-19
# See https://github.com/FreeRDP/FreeRDP/commit/119b8d4474ab8578101f86226e0d20a53460dd51
kbd_list=$("$1" /kbd-list 2>/dev/null)
kbd_list=$("$1" /kbd-list 2>/dev/null) ||
# This seems to have broken in 2020 by commit
# https://github.com/FreeRDP/FreeRDP/commit/30275e7ac3eedf4db1b8fb1c0cb81f03e630ee8a,
# see https://github.com/scop/bash-completion/pull/1380#issuecomment-2870229302
# but is seemingly the only way to list the keyboard layout in 1.0.2, which is
# the version in ubuntu 14.04.6
kbd_list=$("$1" --kbd-list 2>/dev/null)
_comp_awk '/^0x/ { print $1 }' <<<"$kbd_list"
}

Expand Down