justjanne / powerline-go

A beautiful and useful low-latency prompt for your shell, written in go
GNU General Public License v3.0
2.75k stars 269 forks source link

Unknown option error after tab autocompletion and ctrl + C #342

Closed christophehenry closed 1 year ago

christophehenry commented 2 years ago

Describe the bug In some circumstances, it seems that the autocomplete output is transmitted to powerline-go and interpretted as an option. But I hope this is not a very secific error of y setup and it can be reproduced.

To Reproduce Steps to reproduce the behavior:

  1. Type a command that always takes subcommand (for me, it reproduces with Android's adb, it is available on most Linuxes under the android-tools package)

  2. Hit tab to autcomple the subcommands and options; for adb, it should display:

    bugreport          devices            -e                 get-serialno       install            logcat             pull               reboot-bootloader  -s                 status-window      uninstall          
    connect            disable-verity     emu                get-state          jdwp               lolcat             push               remount            shell              sync               usb                
    -d                 disconnect         forward            help               kill-server        -p                 reboot             root               start-server       tcpip              version
  3. Hit ctrl + c

  4. powerline-go should display flag provided but not defined: -d and the the help.

Expected behavior Output from autocomplete should not be passed to powerline-go.

Environment (please complete the following information):

christophehenry commented 1 year ago

This seems to be resolved. Not sure why and when.