changed type of checking: used -n operator instead of -z

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2012-06-26 15:39:31 +03:00
parent 8498c6afe0
commit aa5ffa2b87
4 changed files with 21 additions and 21 deletions

View File

@ -142,11 +142,11 @@ do_open_action() {
fmclient -f "${MC_EXT_FILENAME}"
;;
dvi)
if [ -z "$DISPLAY" ]; then
if [ -n "$DISPLAY" ]; then
(xdvi "${MC_EXT_FILENAME}" &)
else
dvisvga "${MC_EXT_FILENAME}" || \
dvi2tty "${MC_EXT_FILENAME}" | ${PAGER:-more}
else
(xdvi "${MC_EXT_FILENAME}" &)
fi
;;
djvu)

View File

@ -33,10 +33,10 @@ do_open_action() {
(gimp "${MC_EXT_FILENAME}" &)
;;
*)
if [ -z "$DISPLAY" ]; then
zgv "${MC_EXT_FILENAME}"
else
if [ -n "$DISPLAY" ]; then
(gqview "${MC_EXT_FILENAME}" &)
else
zgv "${MC_EXT_FILENAME}"
fi
;;
esac

View File

@ -32,10 +32,10 @@ do_open_action() {
case "${filetype}" in
common)
if [ -z "$DISPLAY" ]; then
play "${MC_EXT_FILENAME}"
else
if [ -n "$DISPLAY" ]; then
(xmms "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
else
play "${MC_EXT_FILENAME}"
fi
;;
mod)
@ -46,17 +46,17 @@ do_open_action() {
vplay -s 22 "${MC_EXT_FILENAME}"
;;
mp3)
if [ -z "$DISPLAY" ]; then
mpg123 "${MC_EXT_FILENAME}"
else
if [ -n "$DISPLAY" ]; then
(xmms "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
else
mpg123 "${MC_EXT_FILENAME}"
fi
;;
ogg)
if [ -z "$DISPLAY" ]; then
ogg123 "${MC_EXT_FILENAME}"
else
if [ -n "$DISPLAY" ]; then
(xmms "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
else
ogg123 "${MC_EXT_FILENAME}"
fi
;;
midi)
@ -66,10 +66,10 @@ do_open_action() {
mplayer -vo null "${MC_EXT_FILENAME}"
;;
playlist)
if [ -z "$DISPLAY" ]; then
mplayer -vo null -playlist "${MC_EXT_FILENAME}"
else
if [ -n "$DISPLAY" ]; then
(xmms -p "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
else
mplayer -vo null -playlist "${MC_EXT_FILENAME}"
fi
;;
*)

View File

@ -25,10 +25,10 @@ do_open_action() {
(realplay "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
;;
*)
if [ -z "$DISPLAY" ]; then
mplayer -vo null "${MC_EXT_FILENAME}"
else
if [ -n "$DISPLAY" ]; then
(mplayer "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
else
mplayer -vo null "${MC_EXT_FILENAME}"
fi
#(gtv "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
#(xanim "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)