Skip to content

Commit 721fa87

Browse files
authored
Merge pull request #1380 from yedayak/xfreerdp-list-kbd-fix
fix(xfreerdp): try `--list-kbd` as last resort
2 parents 641c0a6 + 34c1d89 commit 721fa87

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

completions/xfreerdp

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ _comp_cmd_xfreerdp__kbd_list()
77
kbd_list=$("$1" /list:kbd 2>/dev/null) ||
88
# Old syntax, deprecated in 2022-10-19
99
# See https://github.com/FreeRDP/FreeRDP/commit/119b8d4474ab8578101f86226e0d20a53460dd51
10-
kbd_list=$("$1" /kbd-list 2>/dev/null)
10+
kbd_list=$("$1" /kbd-list 2>/dev/null) ||
11+
# This seems to have broken in 2020 by commit
12+
# https://github.com/FreeRDP/FreeRDP/commit/30275e7ac3eedf4db1b8fb1c0cb81f03e630ee8a,
13+
# see https://github.com/scop/bash-completion/pull/1380#issuecomment-2870229302
14+
# but is seemingly the only way to list the keyboard layout in 1.0.2, which is
15+
# the version in ubuntu 14.04.6
16+
kbd_list=$("$1" --kbd-list 2>/dev/null)
1117
_comp_awk '/^0x/ { print $1 }' <<<"$kbd_list"
1218
}
1319

0 commit comments

Comments
 (0)