Comment 0 for bug 1103237

Revision history for this message
B Bobo (yout-bobo123) wrote : tcsh corrupts its command history list after random number of commands executed

tcsh maintains a history list of the most recent $history commands executed. The history becomes corrupted after a number of commands have been executed. When this happens, the history list is cut off at a random position, showing only a subset of the oldest commands in the history list, discarding the newer commands which were in the history list, and the history list is no longer updated with any newly executed commands. There is no clear trigger for when the history gets corrupted. It can happen after executing only 8 commands or after more than a hundred.

The history list used to work fine in old versions of tcsh somewhere around version 6.10/11/12, but all recent versions of tcsh have the bug. This bug exists in, for example, 6.17.06-2 (amd64) from Ubuntu 12.04 Precise and all previous versions back at least as far as 10.04 Lucid.

Clearing and resetting the history using the history variable does not solve the problem. The only solution is to restart tcsh, e.g. exec tcsh.

The history list is essential for proper use of an interactive shell. Without it, tcsh is almost completely useless as an interactive shell. This is a really serious bug.