[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Very slow command completion when the current directory
From: |
Matthew Cengia |
Subject: |
Re: [Help-bash] Very slow command completion when the current directory is slow to access |
Date: |
Fri, 19 Jul 2013 08:43:45 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2013-07-18 17:39, Peng Yu wrote:
> Hi,
>
> When I am in a directory that is very slow to access (e.g., a virtual
> directory that maps to a ftp server), command completion is also very
> slow. But my $PATH does not have '.'. Does anybody know what causes
> the slow down of command completion? Is there a way to make it fast as
> if the current directory is not slow to access? Thanks.
It's likely your .bashrc is sourcing /etc/bash_completion* which almost
certainly does a whole lot of checks (including the contents of the
current directory) before returning possible completions. Start a shell
with bash --norc --noprofile to see if this fixes the issue. If so, stop
using bash completion indiscriminantly and only source it when you want
it:
alias C='. /etc/bash_completion 2>&-'
--
Regards,
Matthew Cengia
signature.asc
Description: Digital signature