RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1906064 - tcsh history breaks when using modifiers
Summary: tcsh history breaks when using modifiers
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tcsh
Version: 7.9
Hardware: All
OS: All
high
high
Target Milestone: rc
: ---
Assignee: Jan Macku
QA Contact: Karel Volný
URL:
Whiteboard:
Depends On:
Blocks: 1997981 1997986
TreeView+ depends on / blocked
 
Reported: 2020-12-09 15:51 UTC by Frank Hirtz
Modified: 2023-07-18 15:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1997981 1997986 (view as bug list)
Environment:
Last Closed: 2023-07-18 15:41:32 UTC
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github tcsh-org tcsh issues 37 0 None open History breaks when using modifiers ``:gx``, ``:l``... 2021-06-18 11:15:28 UTC

Description Frank Hirtz 2020-12-09 15:51:23 UTC
Description of problem:

The latest 7.9.z errata is causing issue with tcsh history in the client environment:


# Create problem
> alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''

# Exibit problem

> echo 1 2 3 4 5
COMMAND:echo 1 2 3 4 51 2 3 4 5

# <==== Hit Up-arrow in your tcsh, we expect 'echo 1 2 3 4 5' to come up on prompt
> echo 1 2 3 4     <===== Note that "5" is missing!

> echo "a" 'b' "c"
COMMAND:echo "a" 'b' "c"a b c

# <==== Hit Up-arrow in your tcsh, we expect 'echo "a" 'b' "c"' to come up on prompt
> echo \"a\" \'b\' <===== Note that "c" parameter is missing! Also, quotes are escaped.

# Evidence of problem in history:
> history | tail -4
  3760 2020/12/04 7:31 echo "a" 'b' "c"
-50000000 2020/12/04 7:31 echo \"a\" \'b\'       <=== garbage “duplicate” lines without “last word”
  3761 2020/12/04 7:35 history | tail -5
-50000000 2020/12/04 7:35 history | tail         <=== garbage “duplicate” lines without “last word”

# Here’s the normal, expected behavior, when postcmd alias has no special quoting triggering the bug
> alias postcmd '/bin/echo -n "COMMAND EXECUTED"'
> echo 1 2 3 4 5
COMMAND EXECUTED1 2 3 4 5
> echo 1 2 3 4 5             <== Up-arrow brings up correct last command
> echo "a" 'b' "c"
COMMAND EXECUTEDa b c
> echo "a" 'b' "c"           <== Up-arrow brings up correct last command
> history | tail -5
COMMAND EXECUTED
  3765 2020/12/04 7:37 unalias postcmd
  3769 2020/12/04 7:40 alias postcmd '/bin/echo -n "COMMAND EXECUTED"'
  3770 2020/12/04 7:40 echo 1 2 3 4 5
  3771 2020/12/04 7:40 echo "a" 'b' "c"
  3772 2020/12/04 7:40 history | tail -5    <== Correctly formatted history, without corrupted “-5000000” entries

Additional details for RH analysis - 

1.	The behavior is triggered by ANY modifier (“:gx” is the one we use, but I think you can get the same bad result from a simple “:l”)

2.	Does the issue point to tcsh patch? - https://github.com/tcsh-org/tcsh/commit/955c966ffebfb6d791c289b67681f84d4a53d580

Version-Release number of selected component (if applicable):
tcsh-6.18.01-17.el7.x86_64

Comment 2 Frank Hirtz 2020-12-09 15:52:02 UTC
Quick check and notes:

<rhel7>
[root@lab-rhel7-2 ~]# tcsh
[root@lab-rhel7-2 ~]# alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''
[root@lab-rhel7-2 ~]# echo 1 2 3 4 5
COMMAND:echo 1 2 3 4 51 2 3 4 5
[root@lab-rhel7-2 ~]# echo "a" 'b' "c"
COMMAND:echo "a" 'b' "c"a b c
[root@lab-rhel7-2 ~]# history|tail -4
COMMAND:history | tail -4     3 15:28   echo "a" 'b' "c"
-50000000       15:28   echo \"a\" \'b\'
     4  15:29   history | tail -4
-50000000       15:29   history | tail
[root@lab-rhel7-2 ~]# rpm -q tcsh
COMMAND:rpm -q tcshtcsh-6.18.01-17.el7_9.1.x86_64

<downgrade to previous build>

[root@lab-rhel7-2 ~]# exit
[root@lab-rhel7-2 ~]# tcsh
[root@lab-rhel7-2 ~]# alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
[root@lab-rhel7-2 ~]# echo 1 2 3 4 5
COMMAND:alias postcmd1 2 3 4 5
[root@lab-rhel7-2 ~]#  echo "a" 'b' "c"
COMMAND:alias postcmda b c
[root@lab-rhel7-2 ~]# history|tail -4
COMMAND:alias postcmd    11     15:32   alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
    12  15:33   echo 1 2 3 4 5
    13  15:33   echo "a" 'b' "c"
    14  15:33   history | tail -4
[root@lab-rhel7-2 ~]# rpm -q tchs
COMMAND:alias postcmdpackage tchs is not installed
[root@lab-rhel7-2 ~]# rpm -q tcsh
COMMAND:alias postcmdtcsh-6.18.01-17.el7.x86_64
</snip>

<upstream for reference>
 fmhirtz  ~  git  kernel-rhel  tcsh 
[fmhirtz@gkar kernel-rhel]$ 
[fmhirtz@gkar kernel-rhel]$ alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''
[fmhirtz@gkar kernel-rhel]$ echo 1 2 3 4 5
COMMAND:echo 1 2 3 4 51 2 3 4 5
[fmhirtz@gkar kernel-rhel]$  echo "a" 'b' "c"
COMMAND:echo "a" 'b' "c"a b c
[fmhirtz@gkar kernel-rhel]$ history | tail -4
COMMAND:history | tail -4     7 15:35   alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''
     8  15:36   echo 1 2 3 4 5
     9  15:37   echo "a" 'b' "c"
    10  15:37   history | tail -4
[fmhirtz@gkar kernel-rhel]$ rpm -q tcsh
COMMAND:rpm -q tcshtcsh-6.22.03-1.fc33.x86_64
</snip>

Notes: The version prior to the 7.9 patch appears to work correctly per this test (I don't know the validity of the test though; just reproducing). The 7.9 patch truncates and adds some "garbage". Upstream truncates as well on the "up arrow" (it does a "one up"->"1 2 3 4" "two up"->"1 2 3 4 5", but doesn't have the garbage.

So, it looks both of these were picked up in the patch.. some is backporting the "truncation" behavior that's upstream but the "garbage" is novel. The patch that was backported was to correct an issue in the space:

Bug 1846271 - [RHEL-7.9] tcsh corrupt history file results in rapid memory consumption until memory exhausted 

So, this behavior change looks to have been pulled in with this; we'll have to assess.

Comment 6 Jan Macku 2021-02-23 07:37:50 UTC
Hi,

I was able to reproduce this issue and it seems like regression was introduced in tcsh-6.18.01-16.el7.

.history file shows that at the end of each command is added timestamp:

# less .history
> #+1614063515
> alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
> #+1614063520
> echo 1 2 3 4 5#+1614063612
> #+1614063612
> echo 1 2 3 4 5#+1614063647

Strange is that when I was upgrading from tcsh-6.18.01-15.el7 to newer package I wasn't able to reproduce the issue.

I will continue with debugging.

Jan

Comment 7 Jan Macku 2021-02-23 09:30:33 UTC
Hi,

I tried to reproduce it again but this time I removed .history file first and then I wasn't able to reproduce it issue.

[root@localhost ~]# rm .history 
> rm: remove regular file ‘.history’? y
[root@localhost ~]# tcsh
[root@localhost ~]# alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
> alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
[root@localhost ~]# echo 1 2 3 4 5
> COMMAND:alias postcmd1 2 3 4 5
[root@localhost ~]# echo "a" 'b' "c"
> COMMAND:alias postcmda b c
[root@localhost ~]# history | tail -4
> COMMAND:alias postcmd     1	4:11	alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
>      2	4:11	echo 1 2 3 4 5
>      3	4:11	echo "a" 'b' "c"
>      4	4:11	history | tail -4
[root@localhost ~]# rpm -q tcsh
> COMMAND:alias postcmdtcsh-6.18.01-17.el7_9.1.x86_64

Then I exit from tcsh and try it again without deleting .history and everything works as expected.

History in tcsh was always causing issues.

The last Z-stream release should fix some issues with corrupted history. So I would highly suggest to get rid of corrupted history if possible and update to latest tcsh release (tcsh-6.18.01-17.el7_9.1).

Jan

Comment 8 Frank Hirtz 2021-04-08 21:04:44 UTC
Hi Jan,

I'll check that with my case, have the client run through it and let you know. Thanks for looking into this.

Comment 9 Frank Hirtz 2021-06-01 17:39:45 UTC
<baseline with the previous version>
-sh-4.2$ id
uid=777000010(fmhirtz) gid=777000010(fmhirtz) groups=777000010(fmhirtz) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
-sh-4.2$ ls -l ~/.history
ls: cannot access /home/fmhirtz/.history: No such file or directory
-sh-4.2$ rpm -q tcsh
tcsh-6.18.01-17.el7.x86_64
-sh-4.2$ tcsh
[fmhirtz@lab-rhel7-1 ~]$ alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
[fmhirtz@lab-rhel7-1 ~]$ echo 1 2 3 4 5
COMMAND:alias postcmd1 2 3 4 5
[fmhirtz@lab-rhel7-1 ~]$ echo "a" 'b' "c"
COMMAND:alias postcmda b c
[fmhirtz@lab-rhel7-1 ~]$ history | tail -4
COMMAND:alias postcmd     1	17:12	alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
     2	17:12	echo 1 2 3 4 5
     3	17:12	echo "a" 'b' "c"
     4	17:13	history | tail -4
[fmhirtz@lab-rhel7-1 ~]$ cat ~/.history
COMMAND:alias postcmdcat: /home/fmhirtz/.history: No such file or directory
[fmhirtz@lab-rhel7-1 ~]$ history -S
COMMAND:alias postcmd[fmhcat ~/.history
COMMAND:alias postcmd#+1622567559
alias postcmd#+1622567559
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
#+1622567569
echo 1 2 3 4 5
#+1622567576
echo "a" 'b' "c"
#+1622567586
history | tail -4
#+1622567604
cat ~/.history
#+1622567607
history -S
</baseline>

<clean w/ update>
-sh-4.2$ rm -f ~/.history
-sh-4.2$ tcsh
[fmhirtz@lab-rhel7-1 ~]$ history
     1	17:16	history
[fmhirtz@lab-rhel7-1 ~]$ cat ~/.history
cat: /home/fmhirtz/.history: No such file or directory
[fmhirtz@lab-rhel7-1 ~]$ alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
[fmhirtz@lab-rhel7-1 ~]$ echo 1 2 3 4 5
COMMAND:alias postcmd1 2 3 4 5
[fmhirtz@lab-rhel7-1 ~]$ echo "a" 'b' "c"
COMMAND:alias postcmda b c
[fmhirtz@lab-rhel7-1 ~]$ history | tail -4
COMMAND:alias postcmd     3	17:16	alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
     4	17:17	echo 1 2 3 4 5
     5	17:17	echo "a" 'b' "c"
     6	17:17	history | tail -4
[fmhirtz@lab-rhel7-1 ~]$ cat ~/.history
COMMAND:alias postcmdcat: /home/fmhirtz/.history: No such file or directory
[fmhirtz@lab-rhel7-1 ~]$ history -S
COMMAND:alias postcmd[fmhcat ~/.history
COMMAND:alias postcmd#+1622567793
history
#+1622567819
alias postcmd#+1622567819
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
#+1622567838
echo 1 2 3 4 5
#+1622567848
echo "a" 'b' "c"
#+1622567858
history | tail -4
#+1622567875
cat ~/.history
#+1622567881
history -S
</update>

<previous version clean/test -> update/test>
-sh-4.2$ rpm -q tcsh
tcsh-6.18.01-17.el7_9.1.x86_64
-sh-4.2$ tcsh
[fmhirtz@lab-rhel7-1 ~]$ history | tail -4
     9	17:26	cat ~/.history
    10	17:26	sudo yum update
    11	17:27	alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
    12	17:28	history | tail -4
[fmhirtz@lab-rhel7-1 ~]$ echo 1 2 3 4 5
1 2 3 4 5
[fmhirtz@lab-rhel7-1 ~]$ alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
[fmhirtz@lab-rhel7-1 ~]$ echo 1 2 3 4 5
COMMAND:alias postcmd1 2 3 4 5
[fmhirtz@lab-rhel7-1 ~]$ echo "a" 'b' "c"
COMMAND:alias postcmda b c
[fmhirtz@lab-rhel7-1 ~]$ history | tail -4
COMMAND:alias postcmd    14	17:29	alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
    15	17:29	echo 1 2 3 4 5
    16	17:29	echo "a" 'b' "c"
    17	17:29	history | tail -4
[fmhirtz@lab-rhel7-1 ~]$ cat ~/.history
COMMAND:alias postcmd#+1622568259
history
#+1622568314
alias postcmd#+1622568314
#+1622568314
alias postcmd#+1622568314
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
#+1622568321
echo 1 2 3 4 5
#+1622568328
echo "a" 'b' "c"
#+1622568333
history | tail -4
#+1622568348
history -S
#+1622568363
cat ~/.history
#+1622568378
sudo yum update
#+1622568398
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
[fmhirtz@lab-rhel7-1 ~]$ history -S
COMMAND:alias postcmd[fmhcat ~/.history
COMMAND:alias postcmd#+1622568259
history
#+1622568314
alias postcmd#+1622568314
#+1622568378
sudo yum update
#+1622568554
alias postcmd#+1622568554
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
#+1622568560
echo 1 2 3 4 5
#+1622568565
echo "a" 'b' "c"
#+1622568573
history | tail -4
#+1622568587
cat ~/.history
#+1622568597
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
#+1622568597
history -S
</previous/update>

<reset history on update>
COMMAND:alias postcmd[fmhirtz@lab-rhel7-1 ~]$ exit
-sh-4.2$ rm -f .history
-sh-4.2$ tcsh
[fmhirtz@lab-rhel7-1 ~]$ cat ~/.history
cat: /home/fmhirtz/.history: No such file or directory
[fmhirtz@lab-rhel7-1 ~]$ history | tail -4
     1	17:31	cat ~/.history
     2	17:31	history | tail -4
[fmhirtz@lab-rhel7-1 ~]$ alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
[fmhirtz@lab-rhel7-1 ~]$ echo 1 2 3 4 5
COMMAND:alias postcmd1 2 3 4 5
[fmhirtz@lab-rhel7-1 ~]$ echo "a" 'b' "c"
COMMAND:alias postcmda b c
[fmhirtz@lab-rhel7-1 ~]$ history | tail -4
COMMAND:alias postcmd     3	17:32	alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
     4	17:32	echo 1 2 3 4 5
     5	17:32	echo "a" 'b' "c"
     6	17:32	history | tail -4
[fmhirtz@lab-rhel7-1 ~]$ history -S
COMMAND:alias postcmd[fmhtail -10 ~/.history
COMMAND:alias postcmdalias postcmd#+1622568742
alias postcmd '/bin/echo -n "COMMAND:"'"'"'alias postcmd'"'"''
#+1622568748
echo 1 2 3 4 5
#+1622568754
echo "a" 'b' "c"
#+1622568761
history | tail -4
#+1622568767
history -S
[fmhirtz@lab-rhel7-1 ~]$ 
</retest>

This all seems to work, but I was initially seeing the issue where the timestamp is appended to the command in the history file:

<snip>
COMMAND:cat ~/.history#+1622555182
alias postcmd '/bin/echo -n "COMMAND:"'"'"'!#:-$:gx'"'"''
#+1622555202
COMMAND:echo 1 2 3 4 51 2 3 4 5
#+1622555202
COMMAND:echo 1 2 3 4 51 2 3 4 5#+1622555266
#+1622555529
echo 1 2 3 4 5
#+1622555266
echo 1 2 3 4 5#+1622555300
#+1622555529
echo "a" 'b' "c"
#+1622555300
echo "a" 'b' "c"#+1622555326
#+1622555529
history | tail -4
#+1622555326
history | tail -4#+1622555420
#+1622555420
cd#+1622555466
ls --color=auto -a#+1622555479
#+1622555529
tail -f .bash_history
#+1622555479
tail -f .bash_history#+1622555491
#+1622555529
less .tcshrc
#+1622555491
less .tcshrc#+1622555496
#+1622555500
man tcsh
#+1622555500
ls -l
#+1622555536
cd
#+1622555537
ls -a
#+1622555543
cat .history
#+1622555592
yum update tcsh
#+1622555885
rpm -q tcsh
#+1622555951
rm -f .history
</snip>

That was just on my initial setup and I didn't have a .history, but when I tried to reproduce in a more controlled manner, the issue went away. I'm not quite sure what the relevant variable is here that does this. I'll see about reproducing some more to understand it and check with the client on reproducing in their environment.

Comment 10 Frank Hirtz 2021-06-01 17:50:44 UTC
Stepping back and reinstalling, I can reproduce this with a "clean" history:

<snip>
-sh-4.2$ sudo yum install tcsh
HTTP error (400 - Bad Request)

===========================================================================================================================================================================
 Package                          Arch                               Version                                          Repository                                      Size
===========================================================================================================================================================================
Installing:
 tcsh                             x86_64                             6.18.01-17.el7_9.1                               rhel-7-server-rpms                             339 k

Transaction Summary
===========================================================================================================================================================================
Install  1 Package

Total download size: 339 k
Installed size: 662 k
Is this ok [y/d/N]: y
Warning: RPMDB altered outside of yum.
HTTP error (400 - Bad Request)
HTTP error (400 - Bad Request)

Installed:
  tcsh.x86_64 0:6.18.01-17.el7_9.1                                                                                                                                         

HTTP error (400 - Bad Request)
-sh-4.2$ rpm -q tcsh
tcsh-6.18.01-17.el7_9.1.x86_64
-sh-4.2$ cat ~/.history
cat: /home/fmhirtz/.history: No such file or directory
-sh-4.2$ tcsh
[fmhirtz@lab-rhel7-1 ~]$ alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''
[fmhirtz@lab-rhel7-1 ~]$ echo 1 2 3 4 5
COMMAND:echo 1 2 3 4 51 2 3 4 5
[fmhirtz@lab-rhel7-1 ~]$ echo "a" 'b' "c"
COMMAND:echo "a" 'b' "c"a b c
[fmhirtz@lab-rhel7-1 ~]$ history | tail -10
COMMAND:history | tail -10     1	17:45	alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''
     2	17:45	echo 1 2 3 4 5
-50000000	17:45	echo 1 2 3 4
     3	17:45	echo "a" 'b' "c"
-50000000	17:45	echo \"a\" \'b\'
     4	17:46	history | tail -10
-50000000	17:46	history | tail
[fmhirtz@lab-rhel7-1 ~]$ cat ~/.history
COMMAND:cat ~/.historycat: /home/fmhirtz/.history: No such file or directory
[fmhirtz@lab-rhel7-1 ~]$ history -S
COMMAND:history -Shistory -S[fmhirtz@lab-rhel7-1 ~]$ tail -10 ~/.history
COMMAND:tail -10 ~/.history#+1622569540
echo "a" 'b' "c"#+1622569565
history | tail -10
#+1622569565
history | tail -10#+1622569591
cat ~/.history
#+1622569591
cat ~/.history#+1622569594
history -S
#+1622569594
[fmhirtz@lab-rhel7-1 ~]$ 
</snip>

This was removing the previous tcsh install, deleting the ~/.history, installing the current version, and running the reproducer flow. When I continued with the install, as noted, things get murkier in that this doesn't happen reliably, but the simple install->run appears to show it. There's no ~/.history, so it's not latent corruption... in the file at least.

Comment 11 Jan Macku 2021-06-03 14:03:40 UTC
Hello Frank,
I'll have a look into in next week. I'll keep you updated.

Thank you for reproducer.
Jan

Comment 12 Jan Macku 2021-06-10 06:55:09 UTC
Hi Frank,
I was able to reproduce the issue.

RHEL 7.9:
---------
> [root@localhost ~]# rpm -qa tcsh
> tcsh-6.18.01-17.el7_9.1.x86_64
> ...
> [root@localhost ~]# history | tail -10
> COMMAND:history | tail -10     1	2:23	alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''
>      2	2:23	echo 1 2 3 4 5
> -50000000	2:23	echo 1 2 3 4
>      3	2:23	echo "a" 'b' "c" d
> -50000000	2:23	echo \"a\" \'b\' \"c\"
>      4	2:24	history | tail -10
> -50000000	2:24	history | tail

Fedora Rawhide:
---------------
> [root@localhost ~]# rpm -qa tcsh
> tcsh-6.22.04-1.fc35.x86_64
> ...
> [root@localhost ~]# history | tail -10
> COMMAND:history | tail -10     1	2:30	alias postcmd '/bin/echo -n "COMMAND:"'"'"'\!#:-$:gx'"'"''
>      2	2:30	echo 1 2 3 4 5
>      3	2:31	echo "a" 'b' "c"
>      4	2:32	history | tail -10

In upstream (Fedora) the history looks cleaner, but when I hit the upper arrow, then the last word is always missing (same behaviour as in RHEL 7.9).

I'll continue debugging this issue.

Jan

Comment 13 Jan Macku 2021-06-18 09:37:14 UTC
Hi Frank,
I don't think this is regression, if so, then it's a very old one.

I tried RHEL 7.6 and it behaves the same as RHEL 7.9 and Fedora rawhide.

Regards
Jan

Comment 21 RHEL Program Management 2023-07-18 15:41:32 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.


Note You need to log in before you can comment on or make changes to this bug.