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

Add bash completion for `docker-machine mount` #4300

Merged
merged 1 commit into from Nov 14, 2017

Conversation

Projects
None yet
3 participants
@albers
Member

albers commented Nov 1, 2017

This adds bash completion for #4018.

Notes:
Bash completion supports completion for files and directory with its builtin _filedir function. Sadly, this only works for local files and directories. I don't know a simple way to do remote file system completions. So the first argument is just completed to the machine name and a trailing :. The user will have to add the remote path without support. The second argument is completed to local directories.

I added a helper function _docker_machine_pos_first_nonflag that allows to distinguish between the remote and local path arguments and to suppress completion for further arguments (which would be syntax errors).
This function was copied from Docker's bash completion.

Add bash completion for `docker-machine mount`
Signed-off-by: Harald Albers <github@albersweb.de>
@dgageot

This comment has been minimized.

Show comment
Hide comment
@dgageot

dgageot Nov 14, 2017

Collaborator

LGTM

Collaborator

dgageot commented Nov 14, 2017

LGTM

@dgageot dgageot merged commit 6f12672 into docker:master Nov 14, 2017

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
dco-signed All commits are signed

@albers albers deleted the albers:completion-mount branch Nov 14, 2017

@shin- shin- added this to the 0.14.0 milestone Feb 26, 2018

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