From 0263ff9c1f3e74c1575dee2f99527d3f57479761 Mon Sep 17 00:00:00 2001 From: Tobias Binkowski Date: Thu, 11 Apr 2019 09:07:14 +0200 Subject: [PATCH] Check if command is an executable --- q.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/q.sh b/q.sh index 6114d5b..3253808 100644 --- a/q.sh +++ b/q.sh @@ -64,6 +64,10 @@ preexec_invoke_exec () { REG=${BASH_REMATCH:1} ARGS=${BUFFER:${#BASH_REMATCH}} + if ! /usr/bin/which $Q_COMMAND; then + return 0 + fi + # If called without register, show help if [[ $REG == "" ]]; then echo "q - registers for zsh"