Skip to content

Conversation

@dvdksn
Copy link
Contributor

@dvdksn dvdksn commented Oct 10, 2024

Autocomplete was not set up correctly when tilde was used in FPATH.

Changed the .zshrc config to use $HOME instead (and quoting the heredoc delimiter to escape env vars)

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@dvdksn dvdksn requested a review from Benehiko October 10, 2024 13:06
@netlify
Copy link

netlify bot commented Oct 10, 2024

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 669b007
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/6707d15e402c380008a5d501
😎 Deploy Preview https://deploy-preview-21101--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the area/engine Issue affects Docker engine/daemon label Oct 10, 2024
@dvdksn dvdksn added the area/cli Relates to the CLI client label Oct 10, 2024
@dvdksn dvdksn requested a review from a team October 10, 2024 13:26
@thaJeztah
Copy link
Member

Wondering if we can use the instruction from the completions command itself;

docker completion zsh --help

Usage:  docker completion zsh

Generate the autocompletion script for the zsh shell.

If shell completion is not already enabled in your environment you will need
to enable it.  You can execute the following once:

	echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

	source <(docker completion zsh)

To load completions for every new session, execute once:

#### Linux:

	docker completion zsh > "${fpath[1]}/_docker"

#### macOS:

	docker completion zsh > $(brew --prefix)/share/zsh/site-functions/_docker

You will need to start a new shell for this setup to take effect.

@dvdksn
Copy link
Contributor Author

dvdksn commented Oct 10, 2024

docker completion zsh > "${fpath[1]}/_docker"

I don't particularly love this. Maybe because I am not a zsh user, but I think the version in these docs are clearer.

Copy link
Contributor

@sarahsanders-docker sarahsanders-docker left a comment

Choose a reason for hiding this comment

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

LGTM

@dvdksn dvdksn merged commit e8a03f8 into docker:main Oct 16, 2024
14 checks passed
@dvdksn dvdksn deleted the zsh-completion-home branch October 16, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Relates to the CLI client area/engine Issue affects Docker engine/daemon status/review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tilde used in zsh completion leads to misconfiguration

4 participants