Zsh-autocomplete: Please return my panic button: Ctrl-C

Created on 17 Jun 2020  路  9Comments  路  Source: marlonrichert/zsh-autocomplete

(first: just wanted to say thanks for a wonderful plugin!)

Describe the bug

Sometimes I get in a mess on a command line and just want to (angrily) escape the whole thing and start over. I hit Ctrl-C and usually whatever I had created gets abandoned and I'm returned a new pristine command line.

When I get in a mess with this plugin Ctrl-C is ignored which ratches up the panic!

To Reproduce

Steps to reproduce the behavior:

  1. mkdir -p test/a{1,2,3} && cd test
  2. type ls a - suggestions should be shown. (at this point Ctrl-C still works)
  3. press Ctrl + Space to start menu selection
  4. press Ctrl + C there's a ping and we exit menu selection but our command line is still there. OK makes sense for it to exit menu selection, but...
  5. press Ctrl + C again and nothing happens.

Expected behavior

Ctrl + C to behave consistently to quit the command line and start a new one.

Note: after step 4, if I hit backspace, or type any other character then Ctrl + C works again.

Desktop

  • OS + distribution: Ubuntu 19.10
  • Zsh version: 5.7.1
  • Plugin version: 33d9812
Bug report

All 9 comments

Here's what I did to reproduce it:

$ cd "$(mktemp -d)"
$ ZDOTDIR=$PWD HOME=$PWD zsh -df
% source path/to/marlonrichert/zsh-autocomplete/zsh-autocomplete.plugin.zsh
% mkdir -p test/a{1,2,3} && cd test
% ls a

then I pressed

  1. CtrlSpace to enter menu selection.
  2. CtrlC to enter menu selection.
  3. CtrlC to abort the line.

Works fine. Ergo, there must be something else in your config that's messing this up.

Can you please try the steps above to see if it works for you? After that, in the same sub shell, you can try executing the lines of .zshrc one by one until you find which one is causing the conflict. After you find out what it is, then I can try to fix it for you.

(first: just wanted to say thanks for a wonderful plugin!)

You're welcome! 馃槉

repeated those exact steps (I was already using zsh -df), same as reported problem. step (3) just pips at me once, and repeating ctrl-c does nada.

I didn't understand this:

in the same sub shell, you can try executing the lines of .zshrc one by one

which .zshrc? if I'm in the subshell, then there isn't a .zshrc is there?

I meant, copy-paste the lines of your .zshrc into the command line of your sub shell, one by one. But if executing the steps above already reproduces the problem for you, then obviously you don't need to do that.

I just noticed you are still on 33d9812, which is not the latest version. Can you please git pull, restart and try again? If that doesn't help, can you please git checkout dev, restart and try again?

Still the case on 4ad65c9 and d2bbeb2 (dev)

I wonder if it's related to you being on Zsh 5.7.1, while I'm on 5.8. Any chance you could update?

@artfulrobot I think I've found the bug: http://www.zsh.org/mla/workers/2019/msg00252.html

@artfulrobot The dev branch now includes a workaround for this. Please test.

Thank you @marlonrichert , I can confirm it works! I'll follow your repo so I'm alerted to when this is released.

@artfulrobot It's now merged to master.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mimoo picture mimoo  路  5Comments

PSalant726 picture PSalant726  路  8Comments

jcassee picture jcassee  路  7Comments

yutakatay picture yutakatay  路  3Comments

CallumHoward picture CallumHoward  路  7Comments