For some reason, when saving and merging tcsh history after executing history -S or history -M, the history numbering jumps by the number of commands saved in the history file. It increases for each execution of history save command.
Pertinent .tcshrc lines:
set histdup=erase
set history=3000
set histfile=~/.tcsh_history
set savehist=( $history "merge" )
Is this a longstanding tcsh bug or am I doing something wrong?
~ > history | head
2149 21:35 mv RSQE.iso RSQE\ ( 1 ) .iso
2150 21:35 mv RSQE.iso RSQE\ \(1\).iso
2151 21:35 mv RSQE.iso RSQE\ \(1\).iso
2152 21:36 echo RSQE*
~ > history -S
~ > history | head
4296 21:35 mv RSQE.iso RSQE\ ( 1 ) .iso
4297 21:35 mv RSQE.iso RSQE\ \(1\).iso
4298 21:35 mv RSQE.iso RSQE\ \(1\).iso
4299 21:36 echo RSQE*
~ > history -M
~ > history | head
6442 21:35 mv RSQE.iso RSQE\ ( 1 ) .iso
6443 21:35 mv RSQE.iso RSQE\ \(1\).iso
6444 21:35 mv RSQE.iso RSQE\ \(1\).iso
6445 21:36 echo RSQE*
This seems to be a bug with merging history files when
histdupis set toerase. Unsetting it and/or setting it toprevorallavoids this problem.