in reply to start

Nice idea, but I use mc to navigate and it does it for me. Just for people not familiar with "MidnightCommander".... I've been using mc to do this under linux. The mc.ext file is loaded with regexes to autostart programs. All I need is to hit 'enter' on the file. Of course, your checking of mime types gives more flexibility in naming(no extension worries),
include/image # Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (ee %f &); fi Open= xv %f 2>&1>/dev/null & View=%view{ascii} identify %f #View=%view{ascii} asciiview %f

Replies are listed 'Best First'.
Never used MC
by #include (Curate) on Oct 15, 2003 at 07:24 UTC
    I've never used MidnightCommander. Actually, I wrote this for a friend of mine. He wanted something like this for use in shell scripts (I'm not sure why), and it needed to be "extension ignorant". I ended up spending a lot more time on it than I planned on, and voila! There it is.

    A genius writes code an idiot can understand, while an idiot writes code the compiler can't understand.