mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
Merge pull request #4177 from torkelrogstad/2020-04-11-lncli-complete
Add auto-generated Fish shell lncli-completions
This commit is contained in:
commit
a8f75e0221
@ -2127,6 +2127,22 @@ func updateChannelPolicy(ctx *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var fishCompletionCommand = cli.Command{
|
||||
Name: "fish-completion",
|
||||
Hidden: true,
|
||||
Action: func(c *cli.Context) error {
|
||||
completion, err := c.App.ToFishCompletion()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// We don't want to suggest files, so we add this
|
||||
// first line to the completions.
|
||||
_, err = fmt.Printf("complete -c %q -f \n%s", c.App.Name, completion)
|
||||
return err
|
||||
},
|
||||
}
|
||||
|
||||
var exportChanBackupCommand = cli.Command{
|
||||
Name: "exportchanbackup",
|
||||
Category: "Channels",
|
||||
@ -2318,8 +2334,9 @@ var verifyChanBackupCommand = cli.Command{
|
||||
"from exportchanbackup",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "multi_file",
|
||||
Usage: "the path to a multi-channel back up file",
|
||||
Name: "multi_file",
|
||||
Usage: "the path to a multi-channel back up file",
|
||||
TakesFile: true,
|
||||
},
|
||||
},
|
||||
Action: actionDecorator(verifyChanBackup),
|
||||
@ -2400,8 +2417,9 @@ var restoreChanBackupCommand = cli.Command{
|
||||
"from exportchanbackup",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "multi_file",
|
||||
Usage: "the path to a multi-channel back up file",
|
||||
Name: "multi_file",
|
||||
Usage: "the path to a multi-channel back up file",
|
||||
TakesFile: true,
|
||||
},
|
||||
},
|
||||
Action: actionDecorator(restoreChanBackup),
|
||||
|
@ -272,14 +272,16 @@ func main() {
|
||||
Usage: "The host:port of LN daemon.",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "lnddir",
|
||||
Value: defaultLndDir,
|
||||
Usage: "The path to lnd's base directory.",
|
||||
Name: "lnddir",
|
||||
Value: defaultLndDir,
|
||||
Usage: "The path to lnd's base directory.",
|
||||
TakesFile: true,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "tlscertpath",
|
||||
Value: defaultTLSCertPath,
|
||||
Usage: "The path to lnd's TLS certificate.",
|
||||
Name: "tlscertpath",
|
||||
Value: defaultTLSCertPath,
|
||||
Usage: "The path to lnd's TLS certificate.",
|
||||
TakesFile: true,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "chain, c",
|
||||
@ -297,8 +299,9 @@ func main() {
|
||||
Usage: "Disable macaroon authentication.",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "macaroonpath",
|
||||
Usage: "The path to macaroon file.",
|
||||
Name: "macaroonpath",
|
||||
Usage: "The path to macaroon file.",
|
||||
TakesFile: true,
|
||||
},
|
||||
cli.Int64Flag{
|
||||
Name: "macaroontimeout",
|
||||
@ -387,6 +390,7 @@ func main() {
|
||||
deletePaymentsCommand,
|
||||
sendCustomCommand,
|
||||
subscribeCustomCommand,
|
||||
fishCompletionCommand,
|
||||
}
|
||||
|
||||
// Add any extra commands determined by build flags.
|
||||
|
@ -1,25 +1,26 @@
|
||||
# Table of Contents
|
||||
* [Installation](#installation)
|
||||
* [Installing a binary release](#installing-a-binary-release)
|
||||
* [Building a tagged version with Docker](#building-a-tagged-version-with-docker)
|
||||
* [Building a development version from source](#building-a-development-version-from-source)
|
||||
* [Preliminaries](#preliminaries-for-installing-from-source)
|
||||
* [Installing lnd](#installing-lnd-from-source)
|
||||
* [Available Backend Operating Modes](#available-backend-operating-modes)
|
||||
* [btcd Options](#btcd-options)
|
||||
* [Neutrino Options](#neutrino-options)
|
||||
* [Bitcoind Options](#bitcoind-options)
|
||||
* [Using btcd](#using-btcd)
|
||||
* [Installing btcd](#installing-btcd)
|
||||
* [Starting btcd](#starting-btcd)
|
||||
* [Running lnd using the btcd backend](#running-lnd-using-the-btcd-backend)
|
||||
* [Using Neutrino](#using-neutrino)
|
||||
* [Using bitcoind or litecoind](#using-bitcoind-or-litecoind)
|
||||
* [Creating a Wallet](#creating-a-wallet)
|
||||
* [Macaroons](#macaroons)
|
||||
* [Network Reachability](#network-reachability)
|
||||
* [Simnet vs. Testnet Development](#simnet-vs-testnet-development)
|
||||
* [Creating an lnd.conf (Optional)](#creating-an-lndconf-optional)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Installation](#installation)
|
||||
- [Installing a binary release](#installing-a-binary-release)
|
||||
- [Building a tagged version with Docker](#building-a-tagged-version-with-docker)
|
||||
- [Building a development version from source](#building-a-development-version-from-source)
|
||||
- [Preliminaries for installing from source](#preliminaries-for-installing-from-source)
|
||||
- [Installing lnd from source](#installing-lnd-from-source)
|
||||
- [Available Backend Operating Modes](#available-backend-operating-modes)
|
||||
- [btcd Options](#btcd-options)
|
||||
- [Neutrino Options](#neutrino-options)
|
||||
- [Bitcoind Options](#bitcoind-options)
|
||||
- [Using btcd](#using-btcd)
|
||||
- [Installing btcd](#installing-btcd)
|
||||
- [Starting btcd](#starting-btcd)
|
||||
- [Running lnd using the btcd backend](#running-lnd-using-the-btcd-backend)
|
||||
- [Using Neutrino](#using-neutrino)
|
||||
- [Using bitcoind or litecoind](#using-bitcoind-or-litecoind)
|
||||
- [Creating a wallet](#creating-a-wallet)
|
||||
- [Macaroons](#macaroons)
|
||||
- [Network Reachability](#network-reachability)
|
||||
- [Simnet vs. Testnet Development](#simnet-vs-testnet-development)
|
||||
- [Creating an lnd.conf (Optional)](#creating-an-lndconf-optional)
|
||||
|
||||
# Installation
|
||||
|
||||
@ -241,6 +242,11 @@ To check that `lnd` was installed properly run the following command:
|
||||
This command requires `bitcoind` (almost any version should do) to be available
|
||||
in the system's `$PATH` variable. Otherwise some of the tests will fail.
|
||||
|
||||
**Command-line completion for `lncli`**
|
||||
|
||||
_Bash_: See `contrib/lncli.bash-completion`
|
||||
_Fish_: Run: `lncli fish-completion > $HOME/.config/fish/completions/lncli.fish`
|
||||
|
||||
# Available Backend Operating Modes
|
||||
|
||||
In order to run, `lnd` requires, that the user specify a chain backend. At the
|
||||
|
@ -5,6 +5,11 @@
|
||||
* [Misconfigured ZMQ
|
||||
setup now gets reported](https://github.com/lightningnetwork/lnd/pull/5710).
|
||||
|
||||
## `lncli`
|
||||
|
||||
* Add [auto-generated command-line completions](https://github.com/lightningnetwork/lnd/pull/4177)
|
||||
for Fish shell.
|
||||
|
||||
## Misc
|
||||
|
||||
* [An example systemd service file](https://github.com/lightningnetwork/lnd/pull/6033)
|
||||
@ -20,4 +25,5 @@
|
||||
# Contributors (Alphabetical Order)
|
||||
|
||||
* Daniel McNally
|
||||
* ErikEk
|
||||
* ErikEk
|
||||
* Torkel Rogstad
|
||||
|
2
go.mod
2
go.mod
@ -57,7 +57,7 @@ require (
|
||||
github.com/stephens2424/writerset v1.0.2 // indirect
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02
|
||||
github.com/urfave/cli v1.20.0
|
||||
github.com/urfave/cli v1.22.4
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.0
|
||||
go.etcd.io/etcd/client/v3 v3.5.0
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
|
||||
|
8
go.sum
8
go.sum
@ -162,6 +162,8 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
@ -700,6 +702,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
|
||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
|
||||
@ -714,6 +717,7 @@ github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
@ -788,8 +792,8 @@ github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
|
||||
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ultraware/funlen v0.0.1 h1:UeC9tpM4wNWzUJfan8z9sFE4QCzjjzlCZmuJN+aOkH0=
|
||||
github.com/ultraware/funlen v0.0.1/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA=
|
||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA=
|
||||
github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
|
||||
github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
|
||||
|
Loading…
Reference in New Issue
Block a user