Skip to content

How to avoid green color before the command is really complete with autocompletion active #645

@cstoyanov-cs

Description

@cstoyanov-cs
$ ble summary

GNU bash, version 5.3.3(1)-release (x86_64-pc-linux-gnu) [Arch Linux]
ble.sh, version 0.4.0-devel4+8060b7ad (noarch) [git 2.51.1.dirty, GNU Make 4.4.1, GNU Awk 5.3.2, API 4.0, PMA Avon 8-g1, (GNU MPFR 4.2.2, GNU MP 6.3.0)]
bash-completion, version 2.16.0 (hash:480ffcc6a751e55621ec526eb5dea7a0d86d9e72, 17877 bytes) (noarch)
locale: LANG=fr_FR.UTF-8
terminal: TERM=xterm-kitty wcwidth=16.0-west/16.0-2+ri, kitty:0 (1;4000;43)
options: +extglob +histappend -hostcomplete +inherit_errexit

Hello, first of all thank you very much for your work on the script. I have a question, im not sure if its a problem or a feature request but when I activate autocompletion with bleopt complete_auto_complete=1. Lets say in the example of clear command, I type cl and the auto completion suggest the word clear for me. But even if I don't accept the suggestion my cl uncomplete and not valid command turn to green.

Is there a way to keep the actual command we are typing red if its not yet a valid command. It is the case if I deactivate autocompletion with : autocompletion with bleopt complete_auto_complete=
But I like autocompletion, I just would like if color could work like fish for example. In fish, the command clea is red even if the autocompletion suggested the r. if I don't validate it its stay red. Im not saying that to compare both I know blesh is not fish. I just think it can help to understand the problem.
Actually sometimes I press enter because my command is green but I forgot to accept the autocompletion so the command isn't valid.

I tried this config but it doesn't work :

ble-face syntax_error='fg=red,bold'

ble-face command_suffix_new='fg=red'

ble-face syntax_command='fg=blue,bold'

ble-face command_file='fg=blue'

ble-face auto_complete='fg=242'

Thank you for your help and again thank you for your work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions