Why is bash completion being loaded so slow on OS X?
up vote
12
down vote
favorite
I don't understand why bash completion is loaded so slow on my MacBook Pro.
I did the following in my ~/.bash_profile
:
echo "Loading BashCompletion..."
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
echo "BashCompletion loaded."
the execution time for bash_completion typically is > 2 seconds.
I find that really annoying when I am working on the terminal which requires me to constantly open new tabs.
Is there a way I can cache this or something?
(Note I am using iTerm2 and this is equally slow on the original terminal in Mac as well).
macos bash
|
show 4 more comments
up vote
12
down vote
favorite
I don't understand why bash completion is loaded so slow on my MacBook Pro.
I did the following in my ~/.bash_profile
:
echo "Loading BashCompletion..."
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
echo "BashCompletion loaded."
the execution time for bash_completion typically is > 2 seconds.
I find that really annoying when I am working on the terminal which requires me to constantly open new tabs.
Is there a way I can cache this or something?
(Note I am using iTerm2 and this is equally slow on the original terminal in Mac as well).
macos bash
That should not be happening. Am I correct you use MacPort's bash completion?
– slhck
Jul 15 '11 at 20:27
What does that file you load look like?
– Daniel Beck♦
Jul 15 '11 at 20:48
@slhck: Yes I am indeed using macport's bash completion
– disappearedng
Jul 15 '11 at 21:17
@Daniel: Everything is fine except for this. I profiled almost every line.
– disappearedng
Jul 15 '11 at 21:17
5
I experience the same slowness and I'm using Homebrew.
– Brice
Jan 30 '12 at 11:52
|
show 4 more comments
up vote
12
down vote
favorite
up vote
12
down vote
favorite
I don't understand why bash completion is loaded so slow on my MacBook Pro.
I did the following in my ~/.bash_profile
:
echo "Loading BashCompletion..."
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
echo "BashCompletion loaded."
the execution time for bash_completion typically is > 2 seconds.
I find that really annoying when I am working on the terminal which requires me to constantly open new tabs.
Is there a way I can cache this or something?
(Note I am using iTerm2 and this is equally slow on the original terminal in Mac as well).
macos bash
I don't understand why bash completion is loaded so slow on my MacBook Pro.
I did the following in my ~/.bash_profile
:
echo "Loading BashCompletion..."
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
echo "BashCompletion loaded."
the execution time for bash_completion typically is > 2 seconds.
I find that really annoying when I am working on the terminal which requires me to constantly open new tabs.
Is there a way I can cache this or something?
(Note I am using iTerm2 and this is equally slow on the original terminal in Mac as well).
macos bash
macos bash
edited Jul 15 '11 at 20:27
slhck
158k47437461
158k47437461
asked Jul 15 '11 at 19:37
disappearedng
3461716
3461716
That should not be happening. Am I correct you use MacPort's bash completion?
– slhck
Jul 15 '11 at 20:27
What does that file you load look like?
– Daniel Beck♦
Jul 15 '11 at 20:48
@slhck: Yes I am indeed using macport's bash completion
– disappearedng
Jul 15 '11 at 21:17
@Daniel: Everything is fine except for this. I profiled almost every line.
– disappearedng
Jul 15 '11 at 21:17
5
I experience the same slowness and I'm using Homebrew.
– Brice
Jan 30 '12 at 11:52
|
show 4 more comments
That should not be happening. Am I correct you use MacPort's bash completion?
– slhck
Jul 15 '11 at 20:27
What does that file you load look like?
– Daniel Beck♦
Jul 15 '11 at 20:48
@slhck: Yes I am indeed using macport's bash completion
– disappearedng
Jul 15 '11 at 21:17
@Daniel: Everything is fine except for this. I profiled almost every line.
– disappearedng
Jul 15 '11 at 21:17
5
I experience the same slowness and I'm using Homebrew.
– Brice
Jan 30 '12 at 11:52
That should not be happening. Am I correct you use MacPort's bash completion?
– slhck
Jul 15 '11 at 20:27
That should not be happening. Am I correct you use MacPort's bash completion?
– slhck
Jul 15 '11 at 20:27
What does that file you load look like?
– Daniel Beck♦
Jul 15 '11 at 20:48
What does that file you load look like?
– Daniel Beck♦
Jul 15 '11 at 20:48
@slhck: Yes I am indeed using macport's bash completion
– disappearedng
Jul 15 '11 at 21:17
@slhck: Yes I am indeed using macport's bash completion
– disappearedng
Jul 15 '11 at 21:17
@Daniel: Everything is fine except for this. I profiled almost every line.
– disappearedng
Jul 15 '11 at 21:17
@Daniel: Everything is fine except for this. I profiled almost every line.
– disappearedng
Jul 15 '11 at 21:17
5
5
I experience the same slowness and I'm using Homebrew.
– Brice
Jan 30 '12 at 11:52
I experience the same slowness and I'm using Homebrew.
– Brice
Jan 30 '12 at 11:52
|
show 4 more comments
5 Answers
5
active
oldest
votes
up vote
6
down vote
Short version: Removing a single line from /usr/local/etc/bash_completion
reduced the time to open a new tab from ten seconds to a quarter of a second. Read on for details.
I'm using bash-completion from homebrew and encountered the same problem. It was taking over ten seconds to load the bash completion scripts each time I opened a terminal.
Most of that time, it seems is taken up by a single line in the have()
function: a call to type
to determine if a command-line program is installed.
With the default have()
function and all of the provided bash completion scripts in place, it would take 10.561s to load the scripts (reported by prefixing time
to the . /opt/local/etc/bash_completion
line in my .bash_profile
file.
After commenting out the PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
line of my /usr/local/etc/bash_completion
script (leaving the have=yes
line, opening a new terminal takes only 0.258s. This time could be reduced further by removing unnecessary completion scripts (symlinks) from the /usr/local/etc/bash_completion.d
directory.
I don't know why the call to type
is taking so long. I'm investigating that next.
One potential downside to this approach is that it will cause bash completion functions to be loaded into memory even though you have no use for them. The have()
function checks to see if a command or application is installed. If it's not, the completion script generally decides not to bother loading itself because it will be of no use.
At the moment, I'm happy with the tradeoff but I will continue to explore the type
problem as I get time. I'll update my answer if I find a better solution.
For me, commenting this line reduces 50ms time, from 230ms to 180ms. Of course I never had it so bad in the first place. 👍
– Edward Anderson
Dec 28 '17 at 2:44
This only shaved off about 60ms, so I've not kept the workaround. I don't have ten second wait times, but about 2s, which is mildly irksome.
– danemacmillan
Feb 7 at 0:03
add a comment |
up vote
0
down vote
I had the same issue. A few simple debugging tricks got me to the root cause.
First, enable DEBUG mode
so you can see what's happening:
export BASH_COMPLETION_DEBUG=true
This enables verbose printing to the console, so you can see the last command. You can now execute the script in the background and you'll see what's happening
. /opt/local/etc/bash_completion &
Take not of the PID
, which you can then trace with ps
or pstree
:
pstree -p <the PID>
:
| | -+= 82095 mfellows -bash
| | -+- 82103 mfellows -bash
| | |-+- 82104 mfellows cargo --list
| | | --- 82106 mfellows rustc -vV --cap-lints allow
As you can see, it started some rust related commands, which were taking ages.
Temporarily removing /opt/boxen/homebrew/etc/bash_completion.d/cargo
resolved my symptoms.
add a comment |
up vote
0
down vote
With the idea that godbyk answer gave me, I found that my PATH variable had a few directories that didn't have any binaries or didn't exists, removing them sped it up significantly. In other words, this is the PATH I had in my bashrc:
PATH="$GOPATH/bin:/some/directory/not/existing:/some/empty/directory:/some/directory/without/binaries:$PATH"
And then I changed it to:
PATH="$GOPATH/bin:$PATH"
This was because have
function in that bash completion, looked for each command, and I had too much of useless directories that was going to be visited for each of those binaries, removing them sped it up.
add a comment |
up vote
-1
down vote
If you're running MacPorts >= 2.1.2 and Mountain Lion it seems your bash_profile
is wrong. Follow the instructions on How to get git-completion.bash to work on Mac OS X?. I assume that could speed up the auto-completion.
Another solution would be to try installing auto-complete via Fink or Homebrew. If that doesn´t work, you could try another shell altogether. I've found that Fish shell is outstanding when it comes to auto-completion (out of the box). Though version 2 is still in beta I would highly recommend it.
add a comment |
up vote
-1
down vote
I'm going to guess that your bash is too old. I'm running stock bash that came with Mountain Lion and here's what I see:
$ port info bash-completion
bash-completion @2.0, Revision 1 (sysutils)
Description: Programmable completion library for bash. This port
**requires bash >=4.1** and is meant to be used together with
the bash port.
Homepage: http://bash-completion.alioth.debian.org/
Runtime Dependencies: bash
Conflicts with: bash-completion-devel
Platforms: darwin
License: GPL-2+
Maintainers: raimue@macports.org
$ bash --version
GNU bash, version **3.2.48(1)-release (x86_64-apple-darwin12)**
Copyright (C) 2007 Free Software Foundation, Inc.
I don't see to have this port command. :( How do I find out which git tab completion software is running on my mac.
– Dean Hiller
Aug 14 '14 at 16:13
@DeanHiller This answer is referring to the Macports package manager, which provides the port command. Macports's bash completion app will be newer than the one provided with OS X.
– Matt S
Aug 25 '14 at 16:12
add a comment |
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
Short version: Removing a single line from /usr/local/etc/bash_completion
reduced the time to open a new tab from ten seconds to a quarter of a second. Read on for details.
I'm using bash-completion from homebrew and encountered the same problem. It was taking over ten seconds to load the bash completion scripts each time I opened a terminal.
Most of that time, it seems is taken up by a single line in the have()
function: a call to type
to determine if a command-line program is installed.
With the default have()
function and all of the provided bash completion scripts in place, it would take 10.561s to load the scripts (reported by prefixing time
to the . /opt/local/etc/bash_completion
line in my .bash_profile
file.
After commenting out the PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
line of my /usr/local/etc/bash_completion
script (leaving the have=yes
line, opening a new terminal takes only 0.258s. This time could be reduced further by removing unnecessary completion scripts (symlinks) from the /usr/local/etc/bash_completion.d
directory.
I don't know why the call to type
is taking so long. I'm investigating that next.
One potential downside to this approach is that it will cause bash completion functions to be loaded into memory even though you have no use for them. The have()
function checks to see if a command or application is installed. If it's not, the completion script generally decides not to bother loading itself because it will be of no use.
At the moment, I'm happy with the tradeoff but I will continue to explore the type
problem as I get time. I'll update my answer if I find a better solution.
For me, commenting this line reduces 50ms time, from 230ms to 180ms. Of course I never had it so bad in the first place. 👍
– Edward Anderson
Dec 28 '17 at 2:44
This only shaved off about 60ms, so I've not kept the workaround. I don't have ten second wait times, but about 2s, which is mildly irksome.
– danemacmillan
Feb 7 at 0:03
add a comment |
up vote
6
down vote
Short version: Removing a single line from /usr/local/etc/bash_completion
reduced the time to open a new tab from ten seconds to a quarter of a second. Read on for details.
I'm using bash-completion from homebrew and encountered the same problem. It was taking over ten seconds to load the bash completion scripts each time I opened a terminal.
Most of that time, it seems is taken up by a single line in the have()
function: a call to type
to determine if a command-line program is installed.
With the default have()
function and all of the provided bash completion scripts in place, it would take 10.561s to load the scripts (reported by prefixing time
to the . /opt/local/etc/bash_completion
line in my .bash_profile
file.
After commenting out the PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
line of my /usr/local/etc/bash_completion
script (leaving the have=yes
line, opening a new terminal takes only 0.258s. This time could be reduced further by removing unnecessary completion scripts (symlinks) from the /usr/local/etc/bash_completion.d
directory.
I don't know why the call to type
is taking so long. I'm investigating that next.
One potential downside to this approach is that it will cause bash completion functions to be loaded into memory even though you have no use for them. The have()
function checks to see if a command or application is installed. If it's not, the completion script generally decides not to bother loading itself because it will be of no use.
At the moment, I'm happy with the tradeoff but I will continue to explore the type
problem as I get time. I'll update my answer if I find a better solution.
For me, commenting this line reduces 50ms time, from 230ms to 180ms. Of course I never had it so bad in the first place. 👍
– Edward Anderson
Dec 28 '17 at 2:44
This only shaved off about 60ms, so I've not kept the workaround. I don't have ten second wait times, but about 2s, which is mildly irksome.
– danemacmillan
Feb 7 at 0:03
add a comment |
up vote
6
down vote
up vote
6
down vote
Short version: Removing a single line from /usr/local/etc/bash_completion
reduced the time to open a new tab from ten seconds to a quarter of a second. Read on for details.
I'm using bash-completion from homebrew and encountered the same problem. It was taking over ten seconds to load the bash completion scripts each time I opened a terminal.
Most of that time, it seems is taken up by a single line in the have()
function: a call to type
to determine if a command-line program is installed.
With the default have()
function and all of the provided bash completion scripts in place, it would take 10.561s to load the scripts (reported by prefixing time
to the . /opt/local/etc/bash_completion
line in my .bash_profile
file.
After commenting out the PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
line of my /usr/local/etc/bash_completion
script (leaving the have=yes
line, opening a new terminal takes only 0.258s. This time could be reduced further by removing unnecessary completion scripts (symlinks) from the /usr/local/etc/bash_completion.d
directory.
I don't know why the call to type
is taking so long. I'm investigating that next.
One potential downside to this approach is that it will cause bash completion functions to be loaded into memory even though you have no use for them. The have()
function checks to see if a command or application is installed. If it's not, the completion script generally decides not to bother loading itself because it will be of no use.
At the moment, I'm happy with the tradeoff but I will continue to explore the type
problem as I get time. I'll update my answer if I find a better solution.
Short version: Removing a single line from /usr/local/etc/bash_completion
reduced the time to open a new tab from ten seconds to a quarter of a second. Read on for details.
I'm using bash-completion from homebrew and encountered the same problem. It was taking over ten seconds to load the bash completion scripts each time I opened a terminal.
Most of that time, it seems is taken up by a single line in the have()
function: a call to type
to determine if a command-line program is installed.
With the default have()
function and all of the provided bash completion scripts in place, it would take 10.561s to load the scripts (reported by prefixing time
to the . /opt/local/etc/bash_completion
line in my .bash_profile
file.
After commenting out the PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
line of my /usr/local/etc/bash_completion
script (leaving the have=yes
line, opening a new terminal takes only 0.258s. This time could be reduced further by removing unnecessary completion scripts (symlinks) from the /usr/local/etc/bash_completion.d
directory.
I don't know why the call to type
is taking so long. I'm investigating that next.
One potential downside to this approach is that it will cause bash completion functions to be loaded into memory even though you have no use for them. The have()
function checks to see if a command or application is installed. If it's not, the completion script generally decides not to bother loading itself because it will be of no use.
At the moment, I'm happy with the tradeoff but I will continue to explore the type
problem as I get time. I'll update my answer if I find a better solution.
edited Apr 19 '17 at 0:18
answered Nov 14 '15 at 1:50
godbyk
19613
19613
For me, commenting this line reduces 50ms time, from 230ms to 180ms. Of course I never had it so bad in the first place. 👍
– Edward Anderson
Dec 28 '17 at 2:44
This only shaved off about 60ms, so I've not kept the workaround. I don't have ten second wait times, but about 2s, which is mildly irksome.
– danemacmillan
Feb 7 at 0:03
add a comment |
For me, commenting this line reduces 50ms time, from 230ms to 180ms. Of course I never had it so bad in the first place. 👍
– Edward Anderson
Dec 28 '17 at 2:44
This only shaved off about 60ms, so I've not kept the workaround. I don't have ten second wait times, but about 2s, which is mildly irksome.
– danemacmillan
Feb 7 at 0:03
For me, commenting this line reduces 50ms time, from 230ms to 180ms. Of course I never had it so bad in the first place. 👍
– Edward Anderson
Dec 28 '17 at 2:44
For me, commenting this line reduces 50ms time, from 230ms to 180ms. Of course I never had it so bad in the first place. 👍
– Edward Anderson
Dec 28 '17 at 2:44
This only shaved off about 60ms, so I've not kept the workaround. I don't have ten second wait times, but about 2s, which is mildly irksome.
– danemacmillan
Feb 7 at 0:03
This only shaved off about 60ms, so I've not kept the workaround. I don't have ten second wait times, but about 2s, which is mildly irksome.
– danemacmillan
Feb 7 at 0:03
add a comment |
up vote
0
down vote
I had the same issue. A few simple debugging tricks got me to the root cause.
First, enable DEBUG mode
so you can see what's happening:
export BASH_COMPLETION_DEBUG=true
This enables verbose printing to the console, so you can see the last command. You can now execute the script in the background and you'll see what's happening
. /opt/local/etc/bash_completion &
Take not of the PID
, which you can then trace with ps
or pstree
:
pstree -p <the PID>
:
| | -+= 82095 mfellows -bash
| | -+- 82103 mfellows -bash
| | |-+- 82104 mfellows cargo --list
| | | --- 82106 mfellows rustc -vV --cap-lints allow
As you can see, it started some rust related commands, which were taking ages.
Temporarily removing /opt/boxen/homebrew/etc/bash_completion.d/cargo
resolved my symptoms.
add a comment |
up vote
0
down vote
I had the same issue. A few simple debugging tricks got me to the root cause.
First, enable DEBUG mode
so you can see what's happening:
export BASH_COMPLETION_DEBUG=true
This enables verbose printing to the console, so you can see the last command. You can now execute the script in the background and you'll see what's happening
. /opt/local/etc/bash_completion &
Take not of the PID
, which you can then trace with ps
or pstree
:
pstree -p <the PID>
:
| | -+= 82095 mfellows -bash
| | -+- 82103 mfellows -bash
| | |-+- 82104 mfellows cargo --list
| | | --- 82106 mfellows rustc -vV --cap-lints allow
As you can see, it started some rust related commands, which were taking ages.
Temporarily removing /opt/boxen/homebrew/etc/bash_completion.d/cargo
resolved my symptoms.
add a comment |
up vote
0
down vote
up vote
0
down vote
I had the same issue. A few simple debugging tricks got me to the root cause.
First, enable DEBUG mode
so you can see what's happening:
export BASH_COMPLETION_DEBUG=true
This enables verbose printing to the console, so you can see the last command. You can now execute the script in the background and you'll see what's happening
. /opt/local/etc/bash_completion &
Take not of the PID
, which you can then trace with ps
or pstree
:
pstree -p <the PID>
:
| | -+= 82095 mfellows -bash
| | -+- 82103 mfellows -bash
| | |-+- 82104 mfellows cargo --list
| | | --- 82106 mfellows rustc -vV --cap-lints allow
As you can see, it started some rust related commands, which were taking ages.
Temporarily removing /opt/boxen/homebrew/etc/bash_completion.d/cargo
resolved my symptoms.
I had the same issue. A few simple debugging tricks got me to the root cause.
First, enable DEBUG mode
so you can see what's happening:
export BASH_COMPLETION_DEBUG=true
This enables verbose printing to the console, so you can see the last command. You can now execute the script in the background and you'll see what's happening
. /opt/local/etc/bash_completion &
Take not of the PID
, which you can then trace with ps
or pstree
:
pstree -p <the PID>
:
| | -+= 82095 mfellows -bash
| | -+- 82103 mfellows -bash
| | |-+- 82104 mfellows cargo --list
| | | --- 82106 mfellows rustc -vV --cap-lints allow
As you can see, it started some rust related commands, which were taking ages.
Temporarily removing /opt/boxen/homebrew/etc/bash_completion.d/cargo
resolved my symptoms.
answered Mar 13 at 20:24
Matthew Fellows
1112
1112
add a comment |
add a comment |
up vote
0
down vote
With the idea that godbyk answer gave me, I found that my PATH variable had a few directories that didn't have any binaries or didn't exists, removing them sped it up significantly. In other words, this is the PATH I had in my bashrc:
PATH="$GOPATH/bin:/some/directory/not/existing:/some/empty/directory:/some/directory/without/binaries:$PATH"
And then I changed it to:
PATH="$GOPATH/bin:$PATH"
This was because have
function in that bash completion, looked for each command, and I had too much of useless directories that was going to be visited for each of those binaries, removing them sped it up.
add a comment |
up vote
0
down vote
With the idea that godbyk answer gave me, I found that my PATH variable had a few directories that didn't have any binaries or didn't exists, removing them sped it up significantly. In other words, this is the PATH I had in my bashrc:
PATH="$GOPATH/bin:/some/directory/not/existing:/some/empty/directory:/some/directory/without/binaries:$PATH"
And then I changed it to:
PATH="$GOPATH/bin:$PATH"
This was because have
function in that bash completion, looked for each command, and I had too much of useless directories that was going to be visited for each of those binaries, removing them sped it up.
add a comment |
up vote
0
down vote
up vote
0
down vote
With the idea that godbyk answer gave me, I found that my PATH variable had a few directories that didn't have any binaries or didn't exists, removing them sped it up significantly. In other words, this is the PATH I had in my bashrc:
PATH="$GOPATH/bin:/some/directory/not/existing:/some/empty/directory:/some/directory/without/binaries:$PATH"
And then I changed it to:
PATH="$GOPATH/bin:$PATH"
This was because have
function in that bash completion, looked for each command, and I had too much of useless directories that was going to be visited for each of those binaries, removing them sped it up.
With the idea that godbyk answer gave me, I found that my PATH variable had a few directories that didn't have any binaries or didn't exists, removing them sped it up significantly. In other words, this is the PATH I had in my bashrc:
PATH="$GOPATH/bin:/some/directory/not/existing:/some/empty/directory:/some/directory/without/binaries:$PATH"
And then I changed it to:
PATH="$GOPATH/bin:$PATH"
This was because have
function in that bash completion, looked for each command, and I had too much of useless directories that was going to be visited for each of those binaries, removing them sped it up.
edited Nov 22 at 17:12
answered Nov 22 at 14:36
Farid Nouri Neshat
1014
1014
add a comment |
add a comment |
up vote
-1
down vote
If you're running MacPorts >= 2.1.2 and Mountain Lion it seems your bash_profile
is wrong. Follow the instructions on How to get git-completion.bash to work on Mac OS X?. I assume that could speed up the auto-completion.
Another solution would be to try installing auto-complete via Fink or Homebrew. If that doesn´t work, you could try another shell altogether. I've found that Fish shell is outstanding when it comes to auto-completion (out of the box). Though version 2 is still in beta I would highly recommend it.
add a comment |
up vote
-1
down vote
If you're running MacPorts >= 2.1.2 and Mountain Lion it seems your bash_profile
is wrong. Follow the instructions on How to get git-completion.bash to work on Mac OS X?. I assume that could speed up the auto-completion.
Another solution would be to try installing auto-complete via Fink or Homebrew. If that doesn´t work, you could try another shell altogether. I've found that Fish shell is outstanding when it comes to auto-completion (out of the box). Though version 2 is still in beta I would highly recommend it.
add a comment |
up vote
-1
down vote
up vote
-1
down vote
If you're running MacPorts >= 2.1.2 and Mountain Lion it seems your bash_profile
is wrong. Follow the instructions on How to get git-completion.bash to work on Mac OS X?. I assume that could speed up the auto-completion.
Another solution would be to try installing auto-complete via Fink or Homebrew. If that doesn´t work, you could try another shell altogether. I've found that Fish shell is outstanding when it comes to auto-completion (out of the box). Though version 2 is still in beta I would highly recommend it.
If you're running MacPorts >= 2.1.2 and Mountain Lion it seems your bash_profile
is wrong. Follow the instructions on How to get git-completion.bash to work on Mac OS X?. I assume that could speed up the auto-completion.
Another solution would be to try installing auto-complete via Fink or Homebrew. If that doesn´t work, you could try another shell altogether. I've found that Fish shell is outstanding when it comes to auto-completion (out of the box). Though version 2 is still in beta I would highly recommend it.
edited Mar 20 '17 at 10:17
Community♦
1
1
answered Mar 27 '13 at 12:17
awek
243
243
add a comment |
add a comment |
up vote
-1
down vote
I'm going to guess that your bash is too old. I'm running stock bash that came with Mountain Lion and here's what I see:
$ port info bash-completion
bash-completion @2.0, Revision 1 (sysutils)
Description: Programmable completion library for bash. This port
**requires bash >=4.1** and is meant to be used together with
the bash port.
Homepage: http://bash-completion.alioth.debian.org/
Runtime Dependencies: bash
Conflicts with: bash-completion-devel
Platforms: darwin
License: GPL-2+
Maintainers: raimue@macports.org
$ bash --version
GNU bash, version **3.2.48(1)-release (x86_64-apple-darwin12)**
Copyright (C) 2007 Free Software Foundation, Inc.
I don't see to have this port command. :( How do I find out which git tab completion software is running on my mac.
– Dean Hiller
Aug 14 '14 at 16:13
@DeanHiller This answer is referring to the Macports package manager, which provides the port command. Macports's bash completion app will be newer than the one provided with OS X.
– Matt S
Aug 25 '14 at 16:12
add a comment |
up vote
-1
down vote
I'm going to guess that your bash is too old. I'm running stock bash that came with Mountain Lion and here's what I see:
$ port info bash-completion
bash-completion @2.0, Revision 1 (sysutils)
Description: Programmable completion library for bash. This port
**requires bash >=4.1** and is meant to be used together with
the bash port.
Homepage: http://bash-completion.alioth.debian.org/
Runtime Dependencies: bash
Conflicts with: bash-completion-devel
Platforms: darwin
License: GPL-2+
Maintainers: raimue@macports.org
$ bash --version
GNU bash, version **3.2.48(1)-release (x86_64-apple-darwin12)**
Copyright (C) 2007 Free Software Foundation, Inc.
I don't see to have this port command. :( How do I find out which git tab completion software is running on my mac.
– Dean Hiller
Aug 14 '14 at 16:13
@DeanHiller This answer is referring to the Macports package manager, which provides the port command. Macports's bash completion app will be newer than the one provided with OS X.
– Matt S
Aug 25 '14 at 16:12
add a comment |
up vote
-1
down vote
up vote
-1
down vote
I'm going to guess that your bash is too old. I'm running stock bash that came with Mountain Lion and here's what I see:
$ port info bash-completion
bash-completion @2.0, Revision 1 (sysutils)
Description: Programmable completion library for bash. This port
**requires bash >=4.1** and is meant to be used together with
the bash port.
Homepage: http://bash-completion.alioth.debian.org/
Runtime Dependencies: bash
Conflicts with: bash-completion-devel
Platforms: darwin
License: GPL-2+
Maintainers: raimue@macports.org
$ bash --version
GNU bash, version **3.2.48(1)-release (x86_64-apple-darwin12)**
Copyright (C) 2007 Free Software Foundation, Inc.
I'm going to guess that your bash is too old. I'm running stock bash that came with Mountain Lion and here's what I see:
$ port info bash-completion
bash-completion @2.0, Revision 1 (sysutils)
Description: Programmable completion library for bash. This port
**requires bash >=4.1** and is meant to be used together with
the bash port.
Homepage: http://bash-completion.alioth.debian.org/
Runtime Dependencies: bash
Conflicts with: bash-completion-devel
Platforms: darwin
License: GPL-2+
Maintainers: raimue@macports.org
$ bash --version
GNU bash, version **3.2.48(1)-release (x86_64-apple-darwin12)**
Copyright (C) 2007 Free Software Foundation, Inc.
edited Apr 4 '13 at 9:37
slhck
158k47437461
158k47437461
answered Apr 4 '13 at 4:56
numeric illustration
28626
28626
I don't see to have this port command. :( How do I find out which git tab completion software is running on my mac.
– Dean Hiller
Aug 14 '14 at 16:13
@DeanHiller This answer is referring to the Macports package manager, which provides the port command. Macports's bash completion app will be newer than the one provided with OS X.
– Matt S
Aug 25 '14 at 16:12
add a comment |
I don't see to have this port command. :( How do I find out which git tab completion software is running on my mac.
– Dean Hiller
Aug 14 '14 at 16:13
@DeanHiller This answer is referring to the Macports package manager, which provides the port command. Macports's bash completion app will be newer than the one provided with OS X.
– Matt S
Aug 25 '14 at 16:12
I don't see to have this port command. :( How do I find out which git tab completion software is running on my mac.
– Dean Hiller
Aug 14 '14 at 16:13
I don't see to have this port command. :( How do I find out which git tab completion software is running on my mac.
– Dean Hiller
Aug 14 '14 at 16:13
@DeanHiller This answer is referring to the Macports package manager, which provides the port command. Macports's bash completion app will be newer than the one provided with OS X.
– Matt S
Aug 25 '14 at 16:12
@DeanHiller This answer is referring to the Macports package manager, which provides the port command. Macports's bash completion app will be newer than the one provided with OS X.
– Matt S
Aug 25 '14 at 16:12
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f311056%2fwhy-is-bash-completion-being-loaded-so-slow-on-os-x%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
That should not be happening. Am I correct you use MacPort's bash completion?
– slhck
Jul 15 '11 at 20:27
What does that file you load look like?
– Daniel Beck♦
Jul 15 '11 at 20:48
@slhck: Yes I am indeed using macport's bash completion
– disappearedng
Jul 15 '11 at 21:17
@Daniel: Everything is fine except for this. I profiled almost every line.
– disappearedng
Jul 15 '11 at 21:17
5
I experience the same slowness and I'm using Homebrew.
– Brice
Jan 30 '12 at 11:52