Switched bindings to use expr
instead of grep
for opening
This commit is contained in:
parent
37b94e9ac2
commit
30519ab5d8
@ -99,13 +99,12 @@ Left click: # Move cursor to file
|
|||||||
bb +goto:"$BBCLICKED"
|
bb +goto:"$BBCLICKED"
|
||||||
fi
|
fi
|
||||||
Enter,Double left click: # Open file/directory
|
Enter,Double left click: # Open file/directory
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ -d "$BBCURSOR" ]; then bb +cd:"$BBCURSOR";
|
||||||
if [ -d "$BBCURSOR" ]; then bb +cd:"$BBCURSOR";
|
elif [ "$(uname)" = "Darwin" ]; then
|
||||||
elif file -bI "$BBCURSOR" | grep -q '^\(text/\|inode/empty\)'; then $EDITOR "$BBCURSOR";
|
if expr "$(file -bI "$BBCURSOR")" : '\(text/\|inode/empty\)' >/dev/null; then $EDITOR "$BBCURSOR";
|
||||||
else open "$BBCURSOR"; fi
|
else open "$BBCURSOR"; fi
|
||||||
else
|
else
|
||||||
if [ -d "$BBCURSOR" ]; then bb +cd:"$BBCURSOR";
|
if expr "$(file -bi "$BBCURSOR")" : '\(text/\|inode/x-empty\)' >/dev/null; then $EDITOR "$BBCURSOR";
|
||||||
elif file -bi "$BBCURSOR" | grep -q '^\(text/\|inode/x-empty\)'; then $EDITOR "$BBCURSOR";
|
|
||||||
else xdg-open "$BBCURSOR"; fi
|
else xdg-open "$BBCURSOR"; fi
|
||||||
fi
|
fi
|
||||||
e: # Edit file in $EDITOR
|
e: # Edit file in $EDITOR
|
||||||
|
Loading…
Reference in New Issue
Block a user