Skip to content
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

--kill-last-command (-k) doesn't seem to work; not in bash's vi mode, not in bash's emacs mode #500

Open
emk2203 opened this issue Oct 12, 2023 · 0 comments

Comments

@emk2203
Copy link

emk2203 commented Oct 12, 2023

I run bash in vi mode and I have the following lines in my .bashrc:

# if this is interactive shell, then bind hstr to Ctrl-r
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\e^i hstr -- \n"'; fi # vi mode

# if this is interactive shell, then bind 'kill last command' to Ctrl-k
if [[ $- =~ .*i.* ]]; then bind '"\C-k": "\e^i hstr -k \n"'; fi # vi  mode

The first line works as expected -- hstr -- (with a space prefix to keep it from history) which is run to show the menu.

The second line runs hstr -k the same way hstr -- runs, but nothing happens. The last history entry is still present.

EDIT: When manually set to set -o emacs, hstr -k doesn't work either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant