[systemd-devel] [PATCH] _systemctl.in: Do not interpret escape sequences in _filter_units_by_property

Wieland Hoffmann themineo at gmail.com
Fri Jan 16 17:10:42 PST 2015


This makes all functions that rely on _f_u_b_p (like
_systemctl_{stop,kill,try_restart}) work with unit names that contain
backslash escaped sequences (like automount units with spaces that are
escaped to "\x20").
---
 shell-completion/zsh/_systemctl.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 3fa59fa..7f2d5ac 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -137,7 +137,7 @@ _filter_units_by_property() {
     unit=${units[i]}
     prop=${(f)"$(_call_program units "$service show --no-pager --property="$property" ${unit} 2>/dev/null")"}
     if [[ "${prop}" = "$property=$value" ]]; then
-      echo " ${unit}"
+      echo -E - " ${unit}"
     fi
   done
 }
-- 
2.2.2



More information about the systemd-devel mailing list