pub / helix-term

Interactive console for the Helix-Editor using TMUX
git clone https://https://src.jayvii.de/pub/helix-term.git
Home | Log | Files | Exports | Refs | README | RSS

commit 89dc7e017a9abbf817838220ce2663f7982fa9d2
parent 1bc7dfe24a7236f60b427e0469f11da0fe03ff5d
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Tue, 21 May 2024 13:03:12 +0200

return error if no session is open

Diffstat:
Mbin/send-to-tmux | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bin/send-to-tmux b/bin/send-to-tmux @@ -3,7 +3,12 @@ # SPDX-FileCopyrightText: 2023-2024 JayVii <jayvii[AT]posteo[DOT]de> # fetch tmux session -TMUX_SESSION=$(cat "./.helixterm_session") +if [ -f "./.helixterm_session" ]; then + TMUX_SESSION=$(cat "./.helixterm_session") +else + echo "There is no open session!" + exit 1; +fi # read piped input readarray -t lines