summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Leferry 2 <alexherbo2@gmail.com>2020-06-27 09:23:36 +0200
committerAlex Leferry 2 <alexherbo2@gmail.com>2020-06-27 09:23:36 +0200
commit99feddbbf8b53b029ca2bf20558a10c45f0e26ef (patch)
tree6b784032055937586378da384b218bd8aae2fd0e
parenta929998ee5240daa44d2c2a2528b40e1045d6518 (diff)
kak-shell: Exit if the Kakoune session is empty
-rwxr-xr-xbin/kak-shell4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/kak-shell b/bin/kak-shell
index 7873961..54afc13 100755
--- a/bin/kak-shell
+++ b/bin/kak-shell
@@ -13,6 +13,10 @@ main() {
printf 'Kakoune session:'
read KAKOUNE_SESSION
fi
+ # Exit if the Kakoune session is empty.
+ if test -z "$KAKOUNE_SESSION"; then
+ exit 1
+ fi
# Start an interactive shell.
start "$@"
}