Red Hat Bugzilla – Bug 1262742
Docker fish completion not working
Last modified: 2015-09-30 13:57:30 EDT
Description of problem:
The package docker-fish-completion does not provide any completions to the Docker CLI using Fish.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install docker-fish-completion.
2. Open a fish terminal.
3. Write `docker rm [TAB]`.
Fish tries to complete with files in CWD.
Fish completes with containers in system, just as Bash.
You can check the same behavior in any docker sub-command (rmi, run, etc.). Same result.
Yajo, I have no idea how this works, and don't use fish. Could you debug why it is not working or open an issue upstream?
Yajo, is this a regression? or has it been this way all along? I'm not a fish user either, so patches are welcome :)
just to note, I haven't changed anything in the docker rpms RE: fish.
This has worked at some point in the past, but long ago. I did not want to report it until Docker itself was working.
After debugging, it seems a bug in fish, but I don't know if in the packaging or in upstream.
According to http://fishshell.com/docs/current/index.html#completion-path, `/usr/share/fish/vendor_completions.d` should be a default search path, but `echo $fish_complete_path` returns this in an empty profile:
~/.config/fish/completions /etc/fish/completions /usr/share/fish/completions ~/.config/fish/generated_completions
After doing `set fish_complete_path $fish_complete_path /usr/share/fish/vendor_completions.d/`, Docker completions start to work. They have some bugs, but that's another story.
The same webpage says:
> Systems using the pkgconfig framework can discover this path from the output of pkg-config --variable completionsdir fish.
So trying that returns this:
Package fish was not found in the pkg-config search path.
Perhaps you should add the directory containing `fish.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fish' found
Please open bugzillas on docker fish completions, along with patches if possible.
(In reply to Daniel Walsh from comment #5)
> Please open bugzillas on docker fish completions, along with patches if
What do you mean? Upstream?
AFAIK docker-fish-completion is OK. The bug seems that Fish does not look into /usr/share/fish/vendor_completions.d by default, and it should.
I already changed the component to fish.
After doing `set fish_complete_path $fish_complete_path /usr/share/fish/vendor_completions.d/`, Docker completions start to work. They have some bugs, but that's another story."
I interpreted the "They have some bugs" to refer to the Docker completions.
Ah ok. Yes indeed I found a bug there, but surely it's upstream's fault.
I'll start reporting there after this one is fixed.
Can you confirm that this bug exists on an up-to-date fish package? It works for me (modulo the bug that I'm about to file against docker).
Never mind, no Docker bug either. There's a bug with upstream docker's rpm package, but that's irrelevant.
With fish-2.2.0-3.fc22.x86_64 it seems fixed, thanks!
The upstream bug I refer is https://github.com/docker/docker/issues/16672, FTR.
Andy does the fedora docker package handle fish correctly?
It seems to. I'm going to close this, since it's not clear to me that there's any remaining bug.