Skip to content
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

not work with menu-complete #7

Open
iiey opened this issue Aug 5, 2019 · 1 comment
Open

not work with menu-complete #7

iiey opened this issue Aug 5, 2019 · 1 comment

Comments

@iiey
Copy link

iiey commented Aug 5, 2019

My setting in ~/.inputrc

set show-all-if-ambiguous on
#cycle through choices with ctrl-right/left
"\e[1;5C": menu-complete
"\e[1;5D": menu-complete-backward

When triggering menu-complete (see man bash) first word takes place (in not wanted format) immediately at the same time with showing suggestions

The problem with this implementation is that we get:

dothis <number> command_name <padding>
           <cursor>

What could we do to improve this behaviour? Thank you in advance!

@iiey
Copy link
Author

iiey commented Aug 5, 2019

an idea is preventing this word formatting if triggered menu-complete (e.g.: %)

  else if (( COMP_TYPE != 37)); then
    for i in "${!suggestions[@]}"; do
      suggestions[$i]="$(printf '%*s' "-$COLUMNS"  "${suggestions[$i]}")"
    done
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant