Skip to content

Commit

Permalink
Merge pull request matryer#1510 from Dispader/fix_no_screens_message
Browse files Browse the repository at this point in the history
Fix 'no screens' state in screen.2m.sh plugin
  • Loading branch information
matryer authored Dec 11, 2020
2 parents 7a04cb0 + 367fcf2 commit be4293d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/screen.2m.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ PATH="/usr/local/bin:$PATH" SCREEN_COMMAND=$(command -v screen)
echo "💻"
echo '---'
SCREENS=$(${SCREEN_COMMAND} -list | grep -o '\s*.*\s*(.*)')
if [[ -z ${SCREENS} ]]; then
echo "no screens"
if [[ -z ${SCREENS} ]] || [[ ${SCREENS} =~ ^.*empty.*$ ]]; then
echo "new screen session | refresh=true bash=${SCREEN_COMMAND}";
else
(
IFS=$'\n'; for LINE in $(screen -list); do
Expand Down

0 comments on commit be4293d

Please sign in to comment.