Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix 16326] Bash completion syntax error on OSX #16345

Merged
merged 1 commit into from
Sep 16, 2015

Conversation

albers
Copy link
Member

@albers albers commented Sep 16, 2015

ref: #16326
On systems where the extglob shell option is not set by default, bash completion would issue an error when sourcing the Docker completion file, see #16326.
The code dealing with this condition (in _docker function) was insufficient.

I verified the script in the albers/bash-completion-mac image with and without the extglob option set.

Signed-off-by: Harald Albers <github@albersweb.de>
@LK4D4
Copy link
Contributor

LK4D4 commented Sep 16, 2015

ping @tianon @jfrazelle

@albers
Copy link
Member Author

albers commented Sep 16, 2015

@AlexZeitler @gauravgoyal
Another issue with bash completion on current MacBooks.
I'm not sure what the default settings are, so please help:
What is the output of shopt -p extglob on your box?

@AlexZeitler
Copy link

@albers Sorry, MBP died and is out of office for repair 😭

@tianon
Copy link
Member

tianon commented Sep 16, 2015

This LGTM, but I think warrants at least a basic "functional" test on a real Mac. 👍

@jessfraz
Copy link
Contributor

who has a mac anymore :P

On Wed, Sep 16, 2015 at 9:44 AM, Alexander Zeitler <notifications@github.com

wrote:

@albers https://github.com/albers Sorry, MBP died and is out of office
for repair [image: 😭]


Reply to this email directly or view it on GitHub
#16345 (comment).

@AlexZeitler
Copy link

@jfrazelle It's just for testing Docker issues on OS X 😬 . If I need to get work done, I'm on Ubuntu anyway 😛

@jessfraz
Copy link
Contributor

lol

@calavera
Copy link
Contributor

I do have a mac to test this stuff 😜 and it LGTM.
comp

calavera added a commit that referenced this pull request Sep 16, 2015
[Fix 16326] Bash completion syntax error on OSX
@calavera calavera merged commit c1e59b9 into moby:master Sep 16, 2015
@AlexZeitler
Copy link

👍

@albers
Copy link
Member Author

albers commented Sep 17, 2015

@calavera wow, someone with a Mac! Can you please tell me what compopt -p extglob outputs on your box?

@albers albers deleted the completion-extglob-fix branch September 17, 2015 07:04
@albers
Copy link
Member Author

albers commented Sep 17, 2015

@calavera the animation is cool. how did you create it?

@calavera
Copy link
Contributor

@albers I'm pretty sure this is useless, but this is the output:

bash-4.3$ compopt -p extglob
bash: compopt: -p: invalid option
compopt: usage: compopt [-o|+o option] [-DE] [name ...]
bash-4.3$ compopt extglob
bash: compopt: extglob: no completion specification
bash-4.3$ bash-3.2
bash: bash-3.2: command not found
bash-4.3$ /usr/bin/bash
bash: /usr/bin/bash: No such file or directory
bash-4.3$ /bin/bash
bash-3.2$ compopt -p extglob
bash: compopt: command not found
bash-3.2$

PS: I use licecap to create quick gifs like that: http://www.cockos.com/licecap

@albers
Copy link
Member Author

albers commented Sep 18, 2015

@calavera Sorry, I asked for the wrong command. Can you please check the output of shopt -p extglob?

@juvenal
Copy link

juvenal commented Oct 15, 2015

@albers, I ran that shoot on my Mac, and the result is this (BTW, I had the same error, and the commit 0a5aac1 seems to have fixed it).

---------------------------------------------------------------------------------------------------------------- 2015-10-14 23:09:27
[juvenal@macbook-pro ~ ]$ shopt -p extglob
shopt -s extglob
---------------------------------------------------------------------------------------------------------------- 2015-10-14 23:09:33
[juvenal@macbook-pro ~ ]$

@albers
Copy link
Member Author

albers commented Oct 18, 2015

Thanks for telling me, @juvenal.
So there are Macs out ther with and without extglob set.

@thaJeztah
Copy link
Member

I see @calavera also has a newer version, possibly installed through homebrew?

fwiw;

$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
$ shopt -p extglob
shopt -s extglob

@albers
Copy link
Member Author

albers commented Oct 19, 2015

@thaJeztah Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants