aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-03-04 13:45:41 +0100
committerAdrian Kummerlaender2016-03-04 13:45:41 +0100
commitc7357934d8dc4c6a6deb68b7bc8bcd733b81601d (patch)
tree8736995cd3b55b5773a8685e1de664f189ba13f3
parentafe443e20fc9197e4a21d8d8d92ad67852f0ef36 (diff)
downloadchange-c7357934d8dc4c6a6deb68b7bc8bcd733b81601d.tar
change-c7357934d8dc4c6a6deb68b7bc8bcd733b81601d.tar.gz
change-c7357934d8dc4c6a6deb68b7bc8bcd733b81601d.tar.bz2
change-c7357934d8dc4c6a6deb68b7bc8bcd733b81601d.tar.lz
change-c7357934d8dc4c6a6deb68b7bc8bcd733b81601d.tar.xz
change-c7357934d8dc4c6a6deb68b7bc8bcd733b81601d.tar.zst
change-c7357934d8dc4c6a6deb68b7bc8bcd733b81601d.zip
Use a more robust way of determining if fallback is requiredHEADmaster
-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="$@"