aboutsummaryrefslogtreecommitdiff
path: root/files/.zsh/rc/S50_functions
diff options
context:
space:
mode:
Diffstat (limited to 'files/.zsh/rc/S50_functions')
-rw-r--r--files/.zsh/rc/S50_functions3
1 files changed, 2 insertions, 1 deletions
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