tcsh corrupts its command history list when history modifiers are used

Bug #1103237 reported by B Bobo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tcsh
Fix Released
Unknown
tcsh (Debian)
New
Undecided
Unassigned
tcsh (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

tcsh maintains a history list of the most recent $history commands executed. The history becomes corrupted after a number of commands with history modifiers 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. The trigger is to keep using commands with history modifiers e.g. !$:r and !$:t and eventually the history corruption will happen.

The history list and history modifiers 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 quit and 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.

Revision history for this message
B Bobo (yout-bobo123) wrote :

This might be related to upstream bug report gw-mantis #223 "History modifiers corrupt history".

B Bobo (yout-bobo123)
description: updated
Changed in tcsh:
status: Unknown → New
B Bobo (yout-bobo123)
Changed in tcsh (Ubuntu):
status: New → Confirmed
B Bobo (yout-bobo123)
summary: - tcsh corrupts its command history list after random number of commands
- executed
+ tcsh corrupts its command history list when history modifiers are used
description: updated
Changed in tcsh:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.