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

Docker command autocomplete broken #1574

Open
felixlabrot opened this issue Dec 2, 2024 · 10 comments
Open

Docker command autocomplete broken #1574

felixlabrot opened this issue Dec 2, 2024 · 10 comments
Labels

Comments

@felixlabrot
Copy link

Describe the bug

When attempting a terminal autocomplete (double TAB) on any Docker command, the following error message is shown:

-bash: _get_comp_words_by_ref: command not found
-bash: [: : integer expression expected
-bash: [: : integer expression expected
-bash: [: : integer expression expected
-bash: _get_comp_words_by_ref: command not found
-bash: [: : integer expression expected
-bash: [: : integer expression expected
-bash: [: : integer expression expected

Reproduction steps

  1. type "docker " into the terminal
  2. double press TAB
  3. observe crash

Expected behavior

Terminal Autocomplete should suggest possible commands, containers, ...

Additional context

Docker version 27.3.1, build 3ab4256

@felixlabrot felixlabrot added the bug label Dec 2, 2024
@dcasota
Copy link
Contributor

dcasota commented Dec 2, 2024

@felixlabrot at least on Ph5 x86_64 this hasn't been reproducible yet. Which version? is it as root/sudo?
image

@felixlabrot
Copy link
Author

This issue can be reproduced on all servers in our datacenter. You tried it wrong. You are listing all commands/files starting with the string "docker". You have to enter a space after "docker " (as stated in the reproduction steps) so you can get all the commands of Docker.
grafik

You could also do a list of all subcommands of the "docker image" command:
grafik

The bug can be reproduced with absolutely everything as long as it starts with "docker ".

@dcasota
Copy link
Contributor

dcasota commented Dec 2, 2024

Yep, got it. Same here after 'docker list'.

@felixlabrot
Copy link
Author

felixlabrot commented Dec 2, 2024

This is a huge pain when you operate a datacenter and 80% of your stuff is in Docker ;)

I guess this is caused by an incompatibility since the recent upgrade from an old Docker release to v27. With the major release upgrade this bug was introduced.

@dcasota
Copy link
Contributor

dcasota commented Dec 2, 2024

23d6b4d
Well, cryptography rules, but
non-AI test cases is a sisyphus job.

@YustasSwamp
Copy link

YustasSwamp commented Dec 3, 2024

@felixlabrot Thanks for the report. Seems like bash completion file for newer docker uses deprecated function. We will fix that.
For now, try this workaround:

wget https://raw.githubusercontent.com/scop/bash-completion/3e51b6c5f2d4344206e95ef77ec384450d957bad/bash_completion.d/000_bash_completion_compat.bash -P /etc/bash_completion.d/

and restart your bash session.

@felixlabrot
Copy link
Author

This fixes the issue.

@felixlabrot
Copy link
Author

When will this fix be rolled out? To this day it is still needed to manually patch the bug.

@felixlabrot
Copy link
Author

Why do you not update your broken software? This is ultra annoying if the very basic function why Photon OS exists in the first place is fundamentally broken and you refuse to deploy a fix for over a month now.

@dcasota
Copy link
Contributor

dcasota commented Jan 5, 2025

@felixlabrot Photon OS is different, it‘s a indirect democracy distribution, because it does not get its pulse from external contributors‘ pull requests, but from Broadcom-internal topics, tasks and security recommendations.
It helps to contribute with pull requests. It‘s sisyphus work in the age of AI but it helps.
And, Happy 2025! - I hope the Photon OS team and we as contributors enjoyed the last couple of weeks and fully charged the battery again.

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

No branches or pull requests

3 participants