ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.99k stars 665 forks source link

file completion on tab always displays list of matches #441

Open darthpale opened 1 year ago

darthpale commented 1 year ago

On fedora 38 (without OMB) when you hit tab for completion of files it will complete it up to the point of ambiguity -- it will not display a list of matching files. If you hit tab a second time it will then display a list of matching files. This is the desired behavior.

OMB on the other hand, always displays list of matching files.
What can I change to disable always displaying matches and only display them on 2nd tab in a row? With the current behavior if there are many matches, the pager is invoked and you have to hit q to quit the pager before being allowed to enter more characters to complete the file name.

akinomyoga commented 1 year ago

The following line specifies the behavior.

https://github.com/ohmybash/oh-my-bash/blob/dd7807fcd2a43339c03402744551eac12f0d669a/lib/shopt.sh#L61

You can overwrite the setting by adding the following line in ~/.bashrc after source "$OSH"/oh-my-bash.sh.

bind 'set show-all-if-ambiguous off'