Skip to content

Commit 34c1d89

Browse files
committed
fix(xfreerdp): try --list-kbd as last resort
This is the only option that seems to work in xfreerdp 1.0.2, which is what comes with ubuntu 14.04. Follow up to #1373
1 parent 9f5aedb commit 34c1d89

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)