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-whole-line bound to \cc breaks subsequent autocompletion #6937
Comments
I can't reproduce here on 2.7.1, 3.1.0 or master as of 2421eb6 - are you able to make a screencast or similar? |
Sure! Does this help? https://asciinema.org/a/YlhHJ6E88tVIglljOVSAHAOes When trying to complete the second time the prompt flashes once, but nothing is completed, when pressing |
It looks like the problem is not present in |
Bisecting reveals that 1978ac8 is the first bad commit which does indeed change a cancelation check |
I can reproduce on Linux. |
I've stumbled upon this bug because I like function __fish_cancel_commandline
# Close the pager if it's open (#4298)
commandline -f cancel
set -l cmd (commandline)
if test -n "$cmd"
commandline -C 1000000
if command -sq tput
# Clear to EOL (to erase any autosuggestion).
echo -n (tput el; or tput ce)
end
commandline ""
end
# Repaint even if we haven't cancelled anything,
# so the prompt refreshes and the terminal scrolls to it.
commandline -f repaint
end |
Nice workaround, you can even replace the whole |
Okay, I think I have a rough idea what's going on here. If you do But if you do @ridiculousfish should know more. |
Huh, indeed. Thanks! For reference here is the even more reduced version: # Adapted from original function
function __fish_cancel_commandline
# Close the pager if it's open (#4298)
commandline -f cancel
# Clear current command line buffer
commandline ""
# Redraw prompt (including now empty command line)
commandline -f repaint
end
|
Looks like this is specific to |
Thanks for filing! |
I can confirm that this fixes the issue. Excellent! |
3.1.0
Linux charon 5.6.6-arch1-1 #1 SMP PREEMPT Tue, 21 Apr 2020 10:35:16 +0000 x86_64 GNU/Linux
alacritty
, but also happens inxterm
Problem description/steps to reproduce:
sh -c 'env HOME=$(mktemp -d) fish'
bind \cc kill-whole-line
fish --ver<TAB>
(should be completed tofish --version
)Ctrl-c
fish --ver<TAB>
. Result: Nothing happens!This also works/breaks for example for
cd .con<TAB>
, but interestingly not when mixing commands (i.e., first completing fish and then completing a folder for cd works find).Also, this seems to be specific to binding it to
Ctrl-c
. I also triedCtrl-f
andCtrl-d
, but here the problem does not occur.The text was updated successfully, but these errors were encountered: