Midnight Commander - how to clear keyboard history ??

Support section for FREESCO v0.4.x 3rd Party Packages

Midnight Commander - how to clear keyboard history ??

Postby bob selby » Tue Oct 02, 2012 3:33 am

The MC package has the ability to use ALT+N/P/H to navigate the command line history for the command line interface at the bottom of the screen.

There are a lot of "rubbish" entries in my history that I'd like to delete.

Is there any way to delete individual entries?? or a way to clear the history entirely??

I've had a look in the help for MC and various manuals but cant see any way to do it.

As an extreme option ... is the history held in a file somewhere that I could delete/edit??

Bob
bob selby
Advanced Member
 
Posts: 302
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: Midnight Commander - how to clear keyboard history ??

Postby Lightning » Tue Oct 02, 2012 6:23 pm

In the user home directory for root "/home/root/.mc" directory there is a file name "history". You can NOT delete the file using mc because the file is created and re-created when you exit mc. So what you have to do is to shut down mc in all instances and remove it from the command line.

rm /home/root/.mc/history

When you run mc again all history will be gone and the file will be created when you shut down mc again. It is also possible to edit the file manually, but again it can not be done from within mc. I have not tried it but I suspect it could be done using "mcedit" directly from the command line on the file. The same file is stored for every user that uses mc in the /home/user-name/.mc directory.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Midnight Commander - how to clear keyboard history ??

Postby bob selby » Wed Oct 03, 2012 5:40 am

Thanks for that :-)

BTW What is the simple editor used when configuring plugins called ??

Regards,
Bob
bob selby
Advanced Member
 
Posts: 302
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: Midnight Commander - how to clear keyboard history ??

Postby Lightning » Wed Oct 03, 2012 11:38 pm

Everything inside of mc use 'mcedit' to edit text files. As for the simple editor used in the base of FREESCO, it is called 'edt' and it has a link called 'edit'. Which if you configure the system to use /usr/bin/mcedit in the setup then the edit command will call it instead of edt.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Midnight Commander - how to clear keyboard history ??

Postby bob selby » Thu Oct 04, 2012 2:48 am

Many thanks - as always, prompt and very helpfull :-)
bob selby
Advanced Member
 
Posts: 302
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK


Return to 3rd Party Package Support for FREESCO v0.4.x

Who is online

Users browsing this forum: No registered users and 2 guests

cron