* chore: stop using go-homedir
The `github.com/mitchellh/go-homedir` repo is archived, no longer needed, and no longer maintained.
- `homedir.Dir` is replaced by the stdlib `os.UserHomeDir`
- `homedir.Expand` is replaced by fsutil.ExpandHome` in the `github.com/ipfs/kubo/misc/fsutil` package.
Additional functionality, such as `DirWritable` and `FileExists` was moved into or included in the `github.com/ipfs/kubo/misc/fsutil` package.
These are missing some of the features of the current hand-rolled
completions, but:
1. Are less buggy.
2. Cover _all_ commands.
3. Don't need to be manually maintained (which we never do anyways).
fixes#4551fixes#8033
this will inform systemd where the service stores it's persistent data and where it needs write access.
Systemd will create the folder and set the right owner rights.
The `compopt` bash builtin is not supported by zsh's bash compatibility
features. By checking for zsh presence and using `complete` instead,
this script becomes suitable for use with both bash and zsh.
This command messes with internal state and doesn't even work at the moment. If
you don't want a block, you should cancel the request that's trying to fetch it.
fixes#5295
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Some minor bug still exist but not breaking.
Everything is marked with "TODO" inline the script.
License: MIT
Signed-off-by: Elias Gabrielsson <elias@benefactory.se>
Add "bitswap" and "repo" to bash completion for `ipfs stats`. They are
listed under `ipfs stats --help`.
Also added their respective subcommands.
License: MIT
Signed-off-by: Nathan Musoke <nathan.musoke@gmail.com>
This patch is in preparation for the gateway's extraction.
It's interesting to trace technical debt back to its
origin, understanding the circumstances in which it
was introduced and built up, and then cutting it back
at exactly the right places.
- Clean up the gateway's surface
The option builder GatewayOption() now takes only
arguments which are relevant for HTTP handler muxing,
i.e. the paths where the gateway should be mounted.
All other configuration happens through the
GatewayConfig object.
- Remove BlockList
I know why this was introduced in the first place,
but it never ended up fulfilling that purpose.
Somehow it was only ever used by the API server,
not the gateway, which really doesn't make sense.
It was also never wired up with CLI nor fs-repo.
Eventually @krl started punching holes into it
to make the Web UI accessible.
- Remove --unrestricted-api
This was holes being punched into BlockList too,
for accessing /ipfs and /ipn on the API server.
With BlockList removed and /ipfs and /ipns freely
accessible, putting this option out of action
is safe. With the next major release,
the option can be removed for good.
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
misc/completion/ipfs-completion.bash: add `ipfs stats` to BASH completion
core/commands/mount_unix.go: ensure error is not nil before printing it
contribute.md: fix bibliography indexing in example
core/commands/swarm.go: change tabs to spaces in USAGE message
*: 80-column readability improvements
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
`launchd` doesn't allow you to *use* environment variables. Nor does it support
tilde-expansion of program names & arguments after OSX 10.10.
To work around this, I've made the plist file a template and included a small
install script that will interpolate the correct values.
Does auto-complete for the ipfs commands, subcommands and parameters.
Reported to works for bash and zfs
The completion could be smarter for some parameters (marked as #TODO)