aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchange4
1 files changed, 3 insertions, 1 deletions
diff --git a/change b/change
index b1929d8..e0c5e78 100755
--- a/change
+++ b/change
@@ -4,7 +4,9 @@ source ~/.bashrc
readonly FILTER_PATH="/usr/local/share/libChangeLog/filter"
-if [[ $(mimedb $1) == application* ]]
+command -v $1 > /dev/null
+
+if [[ $? -eq 0 ]] # i.e. if $1 is an executable
then
readonly EDITOR_NAME=$(basename $1)
readonly EDITOR_CMD="$@"