From f7fbe71fc404d56c9543491344fc651ff3a7d744 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Wed, 4 Nov 2015 11:12:25 +0000 Subject: [PATCH] zsh: shell agnostic check for systemctl --- zshenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshenv b/zshenv index fc7ffc8..e939573 100644 --- a/zshenv +++ b/zshenv @@ -5,7 +5,7 @@ export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" export HOST=$(hostname) -if [[ $+commands[systemctl] ]]; then +if hash systemctl 2>/dev/null; then systemctl --user import-environment \ XDG_CACHE_HOME \ XDG_CONFIG_HOME \ -- 2.48.1