Re: %view macro in the user menu implemented



On Thu, Sep 04, 2003 at 01:17:28PM -0400, Pavel Roskin wrote:
> By the way, the menu needs to be reorganized and cleaned up.  I don't
> think many people need to "Strip headers from current newsarticle" very
> often.

Funny, that -- and the two mentioned by Andrew -- are the very ones I
deleted long ago.... ;-)

I don't know if the below are worth including in the dist; some may like
to see them, however -- I use the heck out of 'em myself.


   + t t | T t
   e       Edit tagged files
           TMPFILE=`mktemp -q -t 2B-ed.XXXXXXXXXX` || exit 1
           set %u
           while [ -n "$1" ]; do
             echo "%d/$1" >>$TMPFILE
             shift
           done
           set %U
           while [ -n "$1" ]; do
             echo "%D/$1" >>$TMPFILE
             shift
           done
           ${EDITOR-vi} `cat $TMPFILE`
           rm -f $TMPFILE


   + ! t dcbfs & ! T dcbfs
   f       diff file with file in the other directory
           TMPFILE=`mktemp -q -t mcdif.XXXXXXXXXX` || exit 1
           echo "< %d/%f" >> $TMPFILE
           echo "> %D/%F" >> $TMPFILE
           echo "------" >> $TMPFILE
           diff %f %D/%F >> $TMPFILE
           if [ "$?" -eq 1 ]; then
              mc -v $TMPFILE
           fi
           rm -f $TMPFILE


   + t t
   F       diff tagged files in current directory
           set %t
           [ $# -eq 2 ] && c=1 || exit 1
           TMPFILE=`mktemp -q -t mcdif.XXXXXXXXXX` || exit 1
           while [ -n "$1" ]; do
             if [ $c -lt 2 ]; then
                echo "< %d/$1" >> $TMPFILE
             else
                echo "> %d/$1" >> $TMPFILE
             fi
             eval ARG$c="%d/$1"
             c=2
             shift
           done
           echo "------" >> $TMPFILE
           diff "$ARG1" "$ARG2" >> $TMPFILE
           if [ "$?" -eq 1 ]; then
              mc -v $TMPFILE
           fi
           rm -f $TMPFILE


I suppose one would use the %view macro now, with that new patch applied.

I use two more -- identical to the last two, except that they are
invoked with 'g' and 'G', and call diff with the '-b' switch.

best,

S.




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