mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 05:41:16 -03:00
completions/docker: don't load if docker is not started
In WSL, if Docker is not started, the `docker` command is a script that prints an error message to stdout instead of a valid script. `docker.exe` is available and can return the completion script. However any completion will end up calling that `docker` script anyway, resulting further errors due to the unexpected output. Closes #12538
This commit is contained in:
committed by
Johannes Altmanninger
parent
ddf99b7063
commit
eab84c896e
@@ -1 +1,4 @@
|
||||
docker completion fish 2>/dev/null | source
|
||||
# In WSL, when the docker app is not yet started, "docker" is a script printing
|
||||
# some error message on stdout instead of a sourceable script
|
||||
set -l docker_completion "$(docker completion fish 2>/dev/null)"
|
||||
and eval "$docker_completion"
|
||||
|
||||
Reference in New Issue
Block a user