From 19a412373ff6fe104a1b69652c727092a806e1db Mon Sep 17 00:00:00 2001 From: Hannu Hartikainen Date: Mon, 18 Jan 2021 10:13:44 +0000 Subject: [PATCH] udisksctl: fix paths with a colon For paths such as `/dev/disk/by-id/usb-JetFlash_Transcend_64GB_15AFGA849642-0:0`, `_describe` parses the colon as field separator. This results in wrong completions and the general feeling that udisksctl is broken because it won't mount my pendrive. Since the output of `udisksctl complete` is (apparently) just a list of paths, it's safe to escape all colons with a backslash. --- src/_udisksctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_udisksctl b/src/_udisksctl index 3caf38c..452b58a 100644 --- a/src/_udisksctl +++ b/src/_udisksctl @@ -52,7 +52,7 @@ _paths() { local -a _path_list - for _path in $(_call_program paths "udisksctl complete \"udisksctl $words\" $CURSOR"); do + for _path in $(_call_program paths "udisksctl complete \"udisksctl $words\" $CURSOR" | sed 's/:/\\:/g'); do _path_list+=$_path done