From 567fbc6b45e9cbd51dfd405d8b21cd44c1d501d5 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Sun, 27 Nov 2022 16:28:53 +0100 Subject: zsh: update completion --- files/.zsh/rc/S50_functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'files/.zsh/rc') diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions index 12611c2..4129fd6 100644 --- a/files/.zsh/rc/S50_functions +++ b/files/.zsh/rc/S50_functions @@ -73,7 +73,8 @@ activate_virtualenv() { } edit-which() { - $EDITOR $(which "$@") + command=$(which "$@") + [ -x "$command" ] && $EDITOR "$command" } compdef edit-which=which -- cgit v1.2.3