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

completion/docker{,-compose}: Load completions from packages #527

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

akinomyoga
Copy link
Contributor

@akinomyoga akinomyoga commented Feb 11, 2024

Fixes #517

@MonkeyKiki @marco-gallegos I've updated the completion scripts. I haven't tested it. Could you test it?

First, it's better to load the completion script coming with Docker and Docker Compose themselves if they are found in the system. So the new version first searches the system for the completion files from the packages. Only when they are not found, the OMB completions source the versions bundled with OMB. I also updated the completions bundled with OMB.

@MonkeyKiki
Copy link

I don't know how to test a pull request. Please tell me how to and I will happily test it

@akinomyoga
Copy link
Contributor Author

OK, then the easiest way is probably to clone the repository and temporarily set the OSH to that cloned directory.

  1. Clone the repository into the temporary directory omb-test
$ git clone https://github.com/akinomyoga/oh-my-bash.git omb-test -b update-docker-completion
  1. Change the value of OSH in your ~/.bashrc
# your bashrc

...

# export OSH=~/.oh-my-bash # please comment out the original path
export OSH=/path/to/omb-test # add this line for testing

...

Please replace /path/to/omb-test to the actual path to the omb-test directory created in step 1.

After finishing the test, you can simply revert the change to your ~/.bashrc and remove the directory omb-test.

@MonkeyKiki
Copy link

Hi @akinomyoga. Thanks for the tutorial.
Your change works fine for me. Would you like me to do more tests ?

@akinomyoga
Copy link
Contributor Author

@MonkeyKiki Thank you for testing! I think it's enough for now. If you notice an issue later, you can any time open a new issue. I'll later merge the PR.

@akinomyoga akinomyoga force-pushed the update-docker-completion branch from 1fedc3f to 767238b Compare February 14, 2024 13:38
@akinomyoga akinomyoga merged commit d556831 into ohmybash:master Feb 14, 2024
4 checks passed
@akinomyoga akinomyoga deleted the update-docker-completion branch February 14, 2024 13:39
@akinomyoga
Copy link
Contributor Author

Thanks. I've merged it.

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

Successfully merging this pull request may close these issues.

Docker completion is not up-to-date
2 participants