On Sat, 26 Nov 2022 email.lists81@gmail.com wrote:
On 2022-11-26 16:55, David Wright wrote:On Sat 26 Nov 2022 at 14:00:39 (+0100), email.lists81@gmail.com wrote:Doing tab completion in my user account is quite sluggish, it takes about half a second before anything happens after pressing tab. I've done an strace on the shell and it turns out that when I press tab bash does a select() on stdout that times out after half a second. When I'm logged in as root and do the same thing bash does not do that, so I presume it has something to do with how tab completion is configured when I'm logged in to my regular user account. I'm not sure how to investigate this further, any help would be appreciated. I'm still on debian 10 and my version of bash is 5.0.3(1)Do you have a networked filesystem in your PATH? Or a directory on a slow device, like a stick or caddy? Remember to check symlinks.No I have neither of thoseIt might also help to know whether: . you've installed the package bash-completion,It is installed yes
For purposes of troubleshooting you could disable it. The shell itself provides path and command completion, which you might find sufficient. And if you neither want nor require the extra functionality provided by that package, you could disable it permanently on your user accounts. I do so with a file ~/.config/bash_completion which contains the line shopt -u progcomp
. you have [ -f /etc/bash_completion ] && . /etc/bash_completion in your startup files,Not in /etc/bash.bashrc, ~/.bashrc or in ~/.profile, same is true for root. But it seems to be sourced from /etc/profile./etc/profile sources everything in /etc/profile.d/ which contains bash_completion.sh. That in turn sources /usr/share/bash-completion/bash_completion if the bash option progcomp is set, progcomp is set now so I presume it is set when /etc/profile is run.cheers A
-- Ce qui est important est rarement urgent et ce qui est urgent est rarement important -- Dwight David Eisenhower