How do I control when bash auto-completion shows a paged list of completions?
up vote
6
down vote
favorite
In my previous linux installations the bash auto-completion has always worked without problems. If I wanted to do anything to files, giving a prefix of the filename and pressing tabulator listed all that matched the prefix but it also repeated the prompt below it with my command and prefix, so that I could immediately continue typing.
Now I have updated my system to kubuntu 18.04 and the auto-completion doesn't work as fluently anymore. What is even stranger, the behaviour is unpredictable like it depended on the konsole. If the command is less, it works always correctly (as described above), but if the command is cp or mv, the behaviour varies. Sometimes it works correctly, but often it shows a list of matching files with more (hiding my prompt) and I have to type q to exit more and be able to continue. A small thing, but annoying since it requires extra typing.
I see that .bashrc calls /usr/share/bash-completion/bash_completion
but I haven't done any changes to this.
Question: What causes this unpredictable behaviour? How can I fix it?
command-line bash kubuntu auto-completion konsole
New contributor
add a comment |
up vote
6
down vote
favorite
In my previous linux installations the bash auto-completion has always worked without problems. If I wanted to do anything to files, giving a prefix of the filename and pressing tabulator listed all that matched the prefix but it also repeated the prompt below it with my command and prefix, so that I could immediately continue typing.
Now I have updated my system to kubuntu 18.04 and the auto-completion doesn't work as fluently anymore. What is even stranger, the behaviour is unpredictable like it depended on the konsole. If the command is less, it works always correctly (as described above), but if the command is cp or mv, the behaviour varies. Sometimes it works correctly, but often it shows a list of matching files with more (hiding my prompt) and I have to type q to exit more and be able to continue. A small thing, but annoying since it requires extra typing.
I see that .bashrc calls /usr/share/bash-completion/bash_completion
but I haven't done any changes to this.
Question: What causes this unpredictable behaviour? How can I fix it?
command-line bash kubuntu auto-completion konsole
New contributor
add a comment |
up vote
6
down vote
favorite
up vote
6
down vote
favorite
In my previous linux installations the bash auto-completion has always worked without problems. If I wanted to do anything to files, giving a prefix of the filename and pressing tabulator listed all that matched the prefix but it also repeated the prompt below it with my command and prefix, so that I could immediately continue typing.
Now I have updated my system to kubuntu 18.04 and the auto-completion doesn't work as fluently anymore. What is even stranger, the behaviour is unpredictable like it depended on the konsole. If the command is less, it works always correctly (as described above), but if the command is cp or mv, the behaviour varies. Sometimes it works correctly, but often it shows a list of matching files with more (hiding my prompt) and I have to type q to exit more and be able to continue. A small thing, but annoying since it requires extra typing.
I see that .bashrc calls /usr/share/bash-completion/bash_completion
but I haven't done any changes to this.
Question: What causes this unpredictable behaviour? How can I fix it?
command-line bash kubuntu auto-completion konsole
New contributor
In my previous linux installations the bash auto-completion has always worked without problems. If I wanted to do anything to files, giving a prefix of the filename and pressing tabulator listed all that matched the prefix but it also repeated the prompt below it with my command and prefix, so that I could immediately continue typing.
Now I have updated my system to kubuntu 18.04 and the auto-completion doesn't work as fluently anymore. What is even stranger, the behaviour is unpredictable like it depended on the konsole. If the command is less, it works always correctly (as described above), but if the command is cp or mv, the behaviour varies. Sometimes it works correctly, but often it shows a list of matching files with more (hiding my prompt) and I have to type q to exit more and be able to continue. A small thing, but annoying since it requires extra typing.
I see that .bashrc calls /usr/share/bash-completion/bash_completion
but I haven't done any changes to this.
Question: What causes this unpredictable behaviour? How can I fix it?
command-line bash kubuntu auto-completion konsole
command-line bash kubuntu auto-completion konsole
New contributor
New contributor
edited Nov 27 at 1:45
muru
134k19284484
134k19284484
New contributor
asked Nov 26 at 17:57
whamalai
915
915
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
6
down vote
The reason turned out to be very simple: If the terminal is sufficiently large, auto-completion can show all alternatives above the prompt (on two columns), but if it is too small, it uses more. So, the trick is to use sufficiently large terminals.
For some reason, I had not encountered this in my previous installations, maybe due to larger terminals/smaller font. With less, everything worked well, because there were fewer alternatives and they fitted the terminal.
New contributor
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
The reason turned out to be very simple: If the terminal is sufficiently large, auto-completion can show all alternatives above the prompt (on two columns), but if it is too small, it uses more. So, the trick is to use sufficiently large terminals.
For some reason, I had not encountered this in my previous installations, maybe due to larger terminals/smaller font. With less, everything worked well, because there were fewer alternatives and they fitted the terminal.
New contributor
add a comment |
up vote
6
down vote
The reason turned out to be very simple: If the terminal is sufficiently large, auto-completion can show all alternatives above the prompt (on two columns), but if it is too small, it uses more. So, the trick is to use sufficiently large terminals.
For some reason, I had not encountered this in my previous installations, maybe due to larger terminals/smaller font. With less, everything worked well, because there were fewer alternatives and they fitted the terminal.
New contributor
add a comment |
up vote
6
down vote
up vote
6
down vote
The reason turned out to be very simple: If the terminal is sufficiently large, auto-completion can show all alternatives above the prompt (on two columns), but if it is too small, it uses more. So, the trick is to use sufficiently large terminals.
For some reason, I had not encountered this in my previous installations, maybe due to larger terminals/smaller font. With less, everything worked well, because there were fewer alternatives and they fitted the terminal.
New contributor
The reason turned out to be very simple: If the terminal is sufficiently large, auto-completion can show all alternatives above the prompt (on two columns), but if it is too small, it uses more. So, the trick is to use sufficiently large terminals.
For some reason, I had not encountered this in my previous installations, maybe due to larger terminals/smaller font. With less, everything worked well, because there were fewer alternatives and they fitted the terminal.
New contributor
New contributor
answered Nov 26 at 18:40
whamalai
915
915
New contributor
New contributor
add a comment |
add a comment |
whamalai is a new contributor. Be nice, and check out our Code of Conduct.
whamalai is a new contributor. Be nice, and check out our Code of Conduct.
whamalai is a new contributor. Be nice, and check out our Code of Conduct.
whamalai is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096251%2fhow-do-i-control-when-bash-auto-completion-shows-a-paged-list-of-completions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown