extending mc.menu ?

I want to view char(13)-line-terminated files directly via mc.

Currently I can transform these file types to unix-text with:
   cat <inputFile> | tr "\015" "\012" >  LnxFile
so, I guess simply translating char(octal15=8+5=13) to char(10)
is all that's required.

But because I do this so often I don't want to have to create a
new file before I use mc to view/edit it.

mc's customisable menu can already do other similar smart jobs.
eg. the one existing menu entry is:--

0       Edit a bug report and send it to root
        ${EDITOR-vi} /tmp/mail.$$
        test -r /tmp/mail.$$ && mail root < /tmp/mail.$$
        rm -f /tmp/mail.$$
.... or this one is close to my requirements:
t       Run latex on file and show it with xdvi
        latex %f && xdvi `basename %f .tex`.dvi

Q1. is the above bash syntax or sch....?

Q2. what mc.menu entry should I try to view my
   char(13)-line-terminated files ?

I've started & tested as OK:
e       Show ETH-oberon format
        ls *obn

Thanks for any feedback,

== Chris Glur.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]