That is correct. Specifically caused by the subshell function of mc. Not sure why it happens, I've been using mc for years and I've never had this problem.So I understand the gibberish is coming from mc, is that right?
Try setting your user's shell to tcsh(1), it's a much easier shell to use than a plain sh(1). It'll take some getting used to though. But it has some really useful features for interactive use. Other's like to use shells/bash or shells/zsh,user's shell: sh
HISTFILE=/root/.histfile # Where to save history to disk
HISTSIZE=1000000 # How many lines of history to keep in memory
SAVEHIST=1000000 # Number of history entries to save to disk
setopt APPEND_HISTORY # Append history to the history file (no overwriting)
setopt SHARE_HISTORY # Share history across terminals
setopt INC_APPEND_HISTORY # Immediately append to the history file, not just when a term is killed
How did you do this? This has been an ongoing problem for me for ages.since I changed to shells/bash (perhaps other shells works too) no more gibberish ...
chsh -s shell/with/path userHow did you do this? This has been an ongoing problem for me for ages.
Presumably I need to clear my history after doing this since it will still hold all the gibberish...chsh -s shell/with/path user
Well, yes? Changing a shell for an user isn't supposed to clean an history file, right?Presumably I need to clear my history after doing this since it will still hold all the gibberish...
Just wondered how a history file should be cleaned... should I just delete it?Well, yes? Changing a shell for an user isn't supposed to clean an history file, right?
I have set the root shell to zsh.
[My recovery user is toor with shell oksh which i copied in the /bin directory ]
Here the relevent lines in my /root/.zshrc,
Then you just have one .histfile in your root directory.Code:HISTFILE=/root/.histfile # Where to save history to disk HISTSIZE=1000000 # How many lines of history to keep in memory SAVEHIST=1000000 # Number of history entries to save to disk setopt APPEND_HISTORY # Append history to the history file (no overwriting) setopt SHARE_HISTORY # Share history across terminals setopt INC_APPEND_HISTORY # Immediately append to the history file, not just when a term is killed
I also have one .history file , i think thats when zsh spawns sh.
I'm not aware of any history config...
% file ~/.history
/home/grahamperrin/.history: ASCII text
%