ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.05k stars 3.01k forks source link

Remove shebang from shell completions #10514

Open kpcyrd opened 1 week ago

kpcyrd commented 1 week ago

Checklist

Installation method

built from source

Version

Kubo version: 0.30.0
Repo version: 16
System version: amd64/linux
Golang version: go1.23.1

Config

No response

Description

hi!

I noticed the shell completions contain a shebang (#!/...) but shell completions are usually sourced instead of executed, so a shebang is not necessary.

For zsh it seems the completions are not working due to this:

% ipfs d<tab><tab>
(nothing happens)
lidel commented 4 days ago

@kpcyrd I am unable to reproduce, following https://github.com/ipfs/kubo/blob/master/docs/command-completion.md#zsh the eval "$(ipfs commands completion zsh)" works fine with zsh 5.9.

Perhaps you are using something else? IF so, why? Are there other docs related to this that we should update?

kpcyrd commented 4 days ago

I'm not sure if eval is the right way to test this, in my case the completions are loaded from /usr/share/zsh/site-functions/_ipfs.

The _ipfs file I use is sha256:001becd85257c39b452858b2371680fcf936b587c94d845bd8fd2e7c17f2df21.