X Tutup
Skip to content

Update Attach, Build, Commit, Cp, Create subcommand fish completions #1005

Merged
vdemeester merged 5 commits intodocker:masterfrom
eiais:fishupdate
May 3, 2018
Merged

Update Attach, Build, Commit, Cp, Create subcommand fish completions #1005
vdemeester merged 5 commits intodocker:masterfrom
eiais:fishupdate

Conversation

@eiais
Copy link
Contributor

@eiais eiais commented Apr 15, 2018

continuing on #977.
Two things I noticed while doing this:
Docker build --target is the only option description that has a period
Docker cp --follow-link description should probably say symbolic links not symbol link

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This is great!

I noticed some minor issues, and left suggestions for follow ups: if you can amend those commits 🤗

complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l no-stdin -d 'Do not attach STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d 'Proxy all received signals to the process (non-TTY mode only). SIGCHLD, SIGKILL, and SIGSTOP are not proxied.'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d ' Proxy all received signals to the process'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some leading whitespace in the description (' Proxy all..)

complete -c docker -f -n '__fish_docker_no_subcommand' -a cp -d "Copy files/folders between a container and the local filesystem"
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s a -l archive -d 'Archive mode (copy all uid/gid information)'
complete -c docker -A -f -n '__fish_seen_subcommand_from cp' -s L -l follow-link -d 'Always follow symbol link in SRC_PATH
'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a line-break before the closing quote

complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s v -l volume -d 'Bind mount a volume'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volumes-from -d 'Mount volumes from the specified container(s)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s w -l workdir -d 'Working directory inside the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l blkio-weight -d 'Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering why all these moved to the end, and not in alphabetical order 😅

complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-add -d 'Add Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cap-drop -d 'Drop Linux capabilities'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d 'Write the container ID to the file'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset -d 'CPUs in which to allow execution (0-3, 0,1)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See question below on alphabetical order 🤗

complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s t -l tty -d 'Allocate a pseudo-TTY'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s u -l user -d 'Username or UID'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s v -l volume -d 'Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s u -l user -d ' Username or UID (format: <name|uid>[:<group|gid>])'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading whitespace in the description (' Username ....)

complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l userns -d 'User namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l uts -d 'UTS namespace to use'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volume-driver -d 'Optional volume driver for the container'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l volumes--from -d 'Mount volumes from the specified container(s)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Not for this PR, but we should change the description, and remove the (s) from container(s); while you can specify the --volumes-from option multiple times, each flag only accepts a single container.

Perhaps we should also have a look at the Mount volumes from ..., because those volumes aren't really "owned" by a container; --volumes-from merely copies the volume settings (source, dest) from the specified containers.

complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l sysctl -d 'Sysctl options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l tmpfs -d 'Mount a tmpfs directory'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l ulimit -d 'Ulimit options'
complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l userns -d 'User namespace to use'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not for this PR, but this option may need a better description (perhaps mentioning valid values)

eiais and others added 5 commits April 20, 2018 11:48
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Signed-off-by: Kyle Spiers <kyle@spiers.me>
Signed-off-by: Kyle Spiers <kyle@spiers.me>
@eiais
Copy link
Contributor Author

eiais commented Apr 26, 2018

@thaJeztah This should be good to go.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l detach-keys -d 'Override the key sequence for detaching a container'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l help -d 'Print usage'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l no-stdin -d 'Do not attach STDIN'
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d 'Proxy all received signals to the process (non-TTY mode only). SIGCHLD, SIGKILL, and SIGSTOP are not proxied.'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps (follow-up) we should add the extra information back to the actual flag description (sounds useful information);

 (non-TTY mode only). SIGCHLD, SIGKILL, and SIGSTOP are not proxied.

@thaJeztah
Copy link
Member

ping @vdemeester @silvin-lubecki PTAL

@thaJeztah
Copy link
Member

ping @vdemeester PTAL

Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup