mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-12-03 14:38:41 +08:00
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.
This commit is contained in:
1 parent
00c7e28e4a
commit
19a412373f
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user