Fix for empty files not getting detected properly

This commit is contained in:
Bruce Hill 2019-10-03 13:49:38 -07:00
parent 16877a5f4b
commit 68a3bbf7e2

View File

@ -84,7 +84,7 @@ Enter,Double left click: # Open file/directory
else open "$BBCURSOR"; fi
else
if [ -d "$BBCURSOR" ]; then bb +cd:"$BBCURSOR";
elif file -bi "$BBCURSOR" | grep -q '^\(text/\|inode/empty\)'; then $EDITOR "$BBCURSOR";
elif file -bi "$BBCURSOR" | grep -q '^\(text/\|inode/x-empty\)'; then $EDITOR "$BBCURSOR";
else xdg-open "$BBCURSOR"; fi
fi
e: # Edit file in $EDITOR