brgmnn / fish-docker-compose Goto Github PK
View Code? Open in Web Editor NEWFish shell completions for docker-compose
License: MIT License
Fish shell completions for docker-compose
License: MIT License
Version 1.7.0 added several new flags and commands:
-f
flag for docker-compose logs
--remove-orphans
flag for docker-compose up
and docker-compose down
--all
flag for docker-compose rm
--tls
, --tlscert
, --tlskey
, etc.)--workdir
flag for docker-compose run
--follow
, --timestamp
, and --tail
flags for docker-compose logs
--build
flag for docker-compose up
docker-compose exec
commandThey way the parsing for services/version is done currently seems a bit problematic. Docker compose has built-in introspection via docker-compose config [--services]
so you can use the output of that to get the version or list of services.
This should also make it possible to get it to work with multiple docker compose files (via -f
flag) as the output of that command is the "merged" list.
My fish-fu is quite weak but if you have some questions on docker I'm happy to answer those.
The main docker-compose repo has a minimal set of completions that only contains some optional --
style arguments on the main docker-compose
command. Those don't seem to be in this repo. Could those be added?
Fish shell comes with completions so I suggest to move the completions to the fish shell repository. I will make a pull request with your completions to fish-shell. Feel free to comment here fish-shell/fish-shell#4731.
Docker Compose 1.6 introduced new file format and added a new command docker-compose events
.[1] That unfortunately means that service name suggestion won't work properly with new docker-compose.yml.
Hello, I touch you because I want to know if it is possible to adapt on debian. I want to use for fish-docker made without success.
Thank you.
Have a good day
I'm using fisher as package manager for my fish and get:
fisher install brgmnn/fish-docker-compose
Installing plugin/s
docker-compose
No command 'fundle' found, did you mean:
Command 'bundle' from package 'bundler' (universe)
fundle: command not found
~/.config/fisherman/conf.d/docker-compose.init.fish (line 1): fundle plugin 'tuvistavie/fish-completion-helpers'
^
from sourcing file ~/.config/fisherman/conf.d/docker-compose.init.fish
called on line 2 of file ~/.local/share/fisherman/functions/__fisher_plugin_source.fish
in function “__fisher_plugin_source”
called on line 33 of file ~/.local/share/fisherman/functions/__fisher_plugin_enable.fish
with parameter list “docker-compose /home/elopez/.config/fisherman/conf.d/docker-compose.init.fish”
in function “__fisher_plugin_enable”
called on line 48 of file ~/.local/share/fisherman/functions/fisher_install.fish
with parameter list “docker-compose /home/elopez/.config/fisherman/cache/docker-compose”
in function “fisher_install”
called on line 1 of file -
with parameter list “brgmnn/fish-docker-compose”
from sourcing file -
called on line 60 of file /usr/share/fish/functions/eval.fish
in function “eval”
called on line 51 of file ~/.local/share/fisherman/functions/fisher.fish
in function “fisher”
called on standard input
with parameter list “install brgmnn/fish-docker-compose”
1 plugin/s installed (4s)
If I type
docker-compose run test mylibrary/<tab>
...where test
is a service and mylibrary
is a path (relative to the current path), I don't get any completions for the path. Without fish-docker-compose
, I do get completions.
While in some compose configurations it's correct to disallow that, in the (I think fairly common?) case that the current path is mapped as a volume into the container, it's valid.
And my prior is that it's better to allow too much than disallow too much
How would you feel about deferring to the existing completions in the case that fish-docker-compose
doesn't a valid completion?
Fish Shell version: fish, version 2.7.1
Docker Compose version: docker-compose version 1.18.0, build 8dd22a9
Compose file version: 2.2
Autocomplete on service name produces the following error:
~/.config/fish/completions/docker-compose.fish (line 5): switch: Expected exactly one argument, got 2
switch $file_version
^
in function '__fish_docker_compose_all_services'
called on standard input
in command substitution
called on standard input
Fish Shell version: 2.6.0
Docker Compose version: 1.16.1
Compose file version: 2.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.