From b49f3009340e875ae8b0a8cb94697916d47e21cc Mon Sep 17 00:00:00 2001 From: Eric Johnson Date: Mon, 23 Aug 2021 18:39:34 -0400 Subject: [PATCH] xinput: escape colons in device names The completion menu breaks if any device names have colons in them, as colons are used to separate completion matches from their descriptions. --- src/_xinput | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_xinput b/src/_xinput index dd99c36..9c0e9b2 100644 --- a/src/_xinput +++ b/src/_xinput @@ -114,7 +114,7 @@ _xinput(){ [[ -n "$i" ]] || continue xinput_devices_id+=($i) name="$(xinput list --name-only $i)" - xinput_devices_name+=($name) + xinput_devices_name+=(${name//:/\\:}) xinput_devices+=($i\:$name) done xinput_devices+=($xinput_devices_name)