(Replying to a post in the mailing list archive, so apologies for lack of threading.)
On May 20, 2016, Toby wrote: > I usually enable the privacy option on GUI desktop systems / file > managers, which prevents them from keeping a menu of recently accessed > files and directories, because I find the feature more troublesome than > useful. > > In plain Bash terminals instead I use a "private window" concept, > borrowed from web browsers. Whenever I'm about to work on private data I > type 'unset HISTFILE', after which all following commands typed into that > window won't be saved in .bash_history (You can make it so that the Bash spawned under MC does this automatically.) > > Is there a similar option for mc? Either a global option to avoid saving > activity history (such as recently accessed files, directories, and > commands) or a temporary switch akin to "private window"? > > Otherwise, has anybody come up with some hook or script to do that? > > I took a look at the files kept by mc and I found the following: > > ~/.local/share/mc/history > ~/.local/share/mc/filepos > ~/.cache/mc/Tree > > The first is the most troublesome file. I only want to keep the > [user-fmt-input] and [mini_input] sections there (which are really > configuration history, rather than activity history) and get rid of > everything else. The second file contains activity history of recently > edited files and the third contains the directories browsed using Tree > view, so they need to go as well. > > I just cleaned up those three files and gave them root:root 644 > permissions, which seems to be doing the trick: it keeps them read-only > with no visible error message. But I'm wondering if there's a better > option out there. I don't know if it helps, but MC respects the following environment variables: XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME Google them. You can create a shell script to launch a "private" MC that puts all these under ~/.private or whatever. (I see that MC stores the "Directory hotlist" data in CONFIG, not DATA. This looks wrong.) (Tip: you can make your "private" MC use a different skin than the regular one.) _______________________________________________ mc mailing list https://mail.gnome.org/mailman/listinfo/mc