bash-completion-tutorial
bash-completion-tutorial copied to clipboard
not work with menu-complete
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!
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
...