Skip to content

Is it possible to show autocompletion proposals only if they are unambiguous? #601

@David0tt

Description

@David0tt

Hi,

Thank you so much for this amazing tool!

Is there a way to set up ble.sh autocomplete in such a way, that it only shows the autocompletion proposals, when it they are unambiguous?

That is, I only want it to show proposed command completions in light grey, when there is only one possible completion available, which would be automatically selected when pressing tab.
for example, when I enter

cp --a

it should not show a grey autocomplete proposal, since there are two possible completions ("--archive" and "--attributes-only"), but when I enter

cp --ar

it should show the grey autocomplete proposal -"chive"

I already put these two options, since I expected them to provide this behavior:

bleopt complete_auto_history=
bleopt complete_ambiguous=

However, it still shows autocomplete proposals in cases that are not unambiguous, i assume, since complete_ambiguous= does not refer to the autocompletion.

Is the behavior i would like to have possible?

$ ble summary
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu) [Ubuntu 24.04.2 LTS]
ble.sh, version 0.4.0-devel4+14f98dd (noarch) [git 2.43.0, GNU Make 4.3, GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)]
bash-completion, version 2.11 (hash:9abb523dbcb688e7fae4b87f5fc9d155b658d9ba, 76898 bytes) (noarch)
fzf key-bindings, (hash:02ac2274aae588457c8ee8d5941276bc5df86cb3, 149 bytes) (noarch) (integration: off)
WARNING: fzf integration "integration/fzf-key-bindings" is not activated.
fzf completion, (hash:02ac2274aae588457c8ee8d5941276bc5df86cb3, 149 bytes) (noarch) (integration: on)
locale: LANG=en_US.UTF-8
terminal: TERM=xterm-256color wcwidth=15.0-west/16.0-2+ri, vte:7600 (61;7600;1)
options: +extglob +histappend -hostcomplete +inherit_errexit

Metadata

Metadata

Assignees

No one assigned

    Labels

    NYI/NewFeatNot yet implemented or New Feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions