added 'quit' to exit a session which is logging

This commit is contained in:
Michael Krayer 2021-04-20 12:05:34 +02:00
parent 7fcda270d8
commit 41e3baa8ec
1 changed files with 13 additions and 0 deletions

13
session
View File

@ -220,6 +220,7 @@ case $mode in
echo "[attached to '$session_name']"
is_logging $session_name && print_scrollback $session_name
eval $CMD
echo "[detached from '$session_name']"
exit $EXITSUCCESS
;;
"new"|"n")
@ -306,6 +307,7 @@ case $mode in
exit_if_nonexisting_session $session_name
fi
for sname in ${session_name[@]}; do
echo $sname
PID=$(get_session_pid $sname)
session_path=$(get_session_path $sname)
log_path=$(get_log_path $sname)
@ -334,6 +336,17 @@ case $mode in
abduco
exit $EXIT_SUCCESS
;;
"quit"|"q")
exit_if_not_in_session
session_name=$ABDUCO_SESSION
CMD=""
if is_logging $session_name; then
CMD+="session log off && "
fi
CMD+="exit"
echo "$CMD" | abduco -p $session_name
exit $EXIT_SUCCESS
;;
"help"|"h")
print_help
exit $EXIT_SUCCESS