[Tcsh] How is merge in savehist supposed to work?
Dr. Werner Fink
werner at suse.de
Thu Jul 13 11:28:24 UTC 2023
On 2023/07/13 10:51:08 +0200, Dr. Werner Fink wrote:
> Hi
>
> after a report of a user I've done a small test case to show the
> problem:
>
> boole:~ # useradd -m -s /bin/tcsh c1
> boole:~ # vi /home/c1/.tcshrc
> boole:~ # cat /home/c1/.tcshrc
> set histdup=prev
> set history=8
> set savehist=($history merge lock)
> boole:~ # su - c1
> boole /home/c1> touch m1
> boole /home/c1> touch m2
> boole /home/c1> touch m3
> boole /home/c1> touch m4
> boole /home/c1> touch m5
> boole /home/c1> touch m6
> boole /home/c1> touch m7
> boole /home/c1> touch m8
> boole /home/c1> logout
> boole:~ # su - c1
> boole /home/c1> cat m1
> boole /home/c1> cat m2
> boole /home/c1> cat m3
> boole /home/c1> cat m4
> boole /home/c1> cat m5
> boole /home/c1> cat m6
> boole /home/c1> cat m7
> boole /home/c1> cat m8
> boole /home/c1> logout
> boole:~ # cat /home/c1/.history
> boole:~ # cat /home/c1/.history
> #+1689237920
> touch m1
> #+1689237921
> touch m2
> #+1689237922
> touch m3
> #+1689237923
> touch m4
> #+1689237924
> touch m5
> #+1689237925
> touch m6
> #+1689237926
> touch m7
> #+1689237927
> touch m8
>
> ... looks like `merge` does not work to get the recent history
>
> Werner
the attached patch seems to solve the problem
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcsh-6.24.10-history-merge.dif
Type: text/x-patch
Size: 1761 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20230713/2b400d0a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 894 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20230713/2b400d0a/attachment.asc>
More information about the Tcsh
mailing list