Fix bug with files script

This commit is contained in:
Miles Alan 2020-06-07 20:44:03 -05:00
parent 8015d49b03
commit 41e2e31f6a

View file

@ -3,9 +3,14 @@ EDITOR=vis
cd "/home/$USER/" || exit 1
handlefiles() {
echo "$1" | grep -iE ".(wav|webm|mp4|ogg|opus|m4a|flac|mov|avi)$" && st -e mpv "$@" && exit
echo "$1" | grep -iE ".(jpg|png|gif)$" && st -e sxiv "$@" && exit
st -e sh -ic "$EDITOR $*" && exit
if echo "$1" | grep -iE ".(wav|webm|mp4|ogg|opus|m4a|flac|mov|avi)$"; then
st -e mpv "$@"
elif echo "$1" | grep -iE ".(jpg|png|gif)$"; then
st -e sxiv "$@"
else
st -e sh -ic "$EDITOR $*"
fi
exit 0
}
while true; do