bash-completion-tutorial icon indicating copy to clipboard operation
bash-completion-tutorial copied to clipboard

not work with menu-complete

Open iiey opened this issue 6 years ago • 1 comments

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 avatar Aug 05 '19 06:08 iiey

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
...

iiey avatar Aug 05 '19 12:08 iiey