-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running a previous command with hstr echoes instead of running the command #452
Comments
Under Haiku we get that same behavior. Upon hitting ENTER after selecting an entry from the history, it gets printed on the console. Currently using bash version 5.1.16, and hstr 2.5.0 (but it happened too with the original Haiku port of hstr, that was was at version 2.0). @davidhaley: can you share more info regarding your OS, terminal app, and bash version? Maybe by comparing info, we can start to narrow the search of where the problem might lie. |
For the record. The issue on the Haiku port was that it needs to use the same bash function as the CYGWIN port (as Haiku also lacks TIOCSTI): Line 193 in be59f8c
And that wasn't reflected on the install/config instructions. Defining that Time to fix/update the Haiku package :-) |
I'm on Archlinux and I am also having this problem. Maybe related also to , #346 ? I do remember it was working fine some weeks ? month? ago. But now, whatever I choose after running "hstr", it always "echoes it", and puts it before the prompt . It doesnt give me any chance to either,
$ hstr --version
Running it says,
the man page itself is not very consistent with this information,
I'v also tried it in different terminals and with zero configurations or customizations on bashrc. sudo useradd - test_user Same problem. Wether I choose "RETURN", "TAB" or "RIGHT", i never get that line of history in the prompt. It always gets printed before the prompt. Other functionalities like, favourites, deleting etc seems to be working |
Same problem as above on Manjaro
|
Must be some kernel thing as It was working for me fine on Debian Sid until I did a kernel upgrade to 6.3.0-1-amd64 and now it echo's but if you type echo !! you notice it doesn't show an echo command. hstr version "3.1.0" (2023-04-18T08:50:00) as the others EDIT: Just noticed this has been mentioned in a bigger issue #478 and solution seems to be to run command sysctl -w dev.tty.legacy_tiocsti=1 |
@s-mahm solution of running |
To ensure that this persists across system restarts on distros using recent systemd versions, create new conf file:
|
There is a reason they disabled that. It's a security issue. https://cateee.net/lkddb/web-lkddb/LEGACY_TIOCSTI.html So, anybody who wants to disable it, just be aware that there are things in the wild which use that for privilege escalation. I guess I can live with it just printing instead of allowing me to edit, but that only works on the newest versions of hstr. If you are using an older version that is packaged in Ubuntu or Debian's current stable repositories, you don't even get that. You just get a return to the shell with nothing printed at all. |
I also get tis on arch, and the @s-mahm solution corrects it. |
@davidhaley Can you close this issue if it was resolved? |
Sorry, I haven't had this installed now for quite some time. |
It was working on linux mint 21.3 (ubuntu 22.04) but upgrading to LM22 (24.04) causes this problem. Summarising earlier posts from @leapfog and @vparitskiy (and making them even more clear for people like me, i.e. not very expert in the linux environment!), this is what I did:
[edited to reference the earlier posts so that the brain power is correctly ascribed] |
Thank you a lot, that worked for me on Ubuntu 22.04 |
I don't think the issue was resolved if the solution is turning off a protection against privilege escalation. |
So.. a new user here. Return/Enter does absolutely nothing on a latest install of Ubuntu 22-04 This is a 2 year ongoing issue that is treated like an elephant in the room. |
I'm not sure what could be causing this.
For example:
echo testing
Then, I press
ctrl+r
, search fortesting
, and pressenter
on the command that we just ran and it echoes:Or, if I use the alias
hh
, find the previous command and run it:My config in
.bashrc
is:hstr version "2.5.0" (2021-12-13T22:00:00)
The text was updated successfully, but these errors were encountered: