[email protected]
[Top] [All Lists]

Re: Mc Digest, Vol 67, Issue 8

Subject: Re: Mc Digest, Vol 67, Issue 8
From: chris glur
Date: Thu, 12 Nov 2009 01:53:29 +0300
Lee wrote:-
>Not sure about the other stuff but I think I know what you want for
> the PWD thing.
> 'mc' has a '-P', or '--printwd', option that will save mc's current
> working directory to a file.
> My 'mc' installed a 'mc-wrapper.sh' script in '/usr/local/libexec/mc'
> that uses that option and does what I think you're looking for.
> In the same directory there should be a 'mc.sh'  script that you can
> source to set up an alias for the 'mc' command.
ls -l /usr/local/libexec/*
ls: /usr/local/libexec/*: No such file or directory

How does an alias help ?
I see how a wrapper could 'pretend' to do it:
 before you exit to the wrapper, it could save PWD to a file [which is 'global'
and independent of any process]. And then the wrapper could set PWD.
I don't like the extra complexity of having to know if/what wrapper I'm in.
One good thing of school-teacher-style Debian is that some of the more complex
manS are easier to understand. So I've finally worked out how to make
which are also global. So my bash-based-micro-mc can save PWD to a
file, and after
it exits I'll just press eg. <F12> which will key:  cd `cat <file
which saved PWD>'.

>> = I've installed mc on Slak3, RH6.2; Slak?; Mandrake9; FC1,
>> mulinux... all with no problems.

Frank wrote:-
>You have installed on those distributions the same mc binary which you
> now try to install on Debian Lenny?

No, I've installed those since 1995.
Each with it's own binary.

> Possibly on the other systems is/was another version of the GNU C
> library (/lib/libc.so.*) available and the mc is linked to this
> version.

Yes, each mc installed automatically from the installation CD/fd0,
to its own partition, with its own /lib, without any problem.
What made me immediately feel strange/negative towards Debian, is
that it didn't install mc & gpm by default.
And uses the CD-space for other strange-stuff.
==== Here's an ealier version of my own visual file manager, that I
have to use on this Debian installation:---
# lst of patches: gawk=unknown: use awk?
# add mkdir,cp,../   Use THIS: mymc3 for patching

write_menu ()


# echo 'numbered lines of dir:-'

# add line-no & show some fields of 'ls -l'
ls -l |
  awk '{print NR "\t"  $1 " : " $5 " : " $9 }'

echo -n "Selection file/dir: "
     read SELCTN

# extract the file/dir via the line-no/SELECTN
FileDir=` ls -l |
 awk -v dirline="$SELCTN"  'NR==dirline { print $9 }' `

 echo 'L[ynx, V[iew, E[dit, cD[ir', Q[uit, M[kdir, C[opy, U[cd ../
 read ACTION
 case $ACTION in
            L | l) w3m $FileDir;;
            U | u) cd ../;;
            V | v) cat $FileDir;;
            E | e) nano $FileDir;;
#  for new file, nano allows chosen fileName to be entered @ 1st 'save'
            D | d) cd  $FileDir;;
            M | m) echo -n 'new-dir name: '; read KEY; mkdir $KEY;;
            C | c) echo -n 'dest-file-name: '; read KEY; cp $FileDir $KEY;;
            Q | q) exit;;

            *) echo -n "an unknown number of";;
 echo -n 'pwd=' ; pwd ;


echo 'key to continue'
read Cont;

Mc mailing list

<Prev in Thread] Current Thread [Next in Thread>