Merge #1145: Add -h/--help args to the GUI
243f4eac0aaf3def57b3a1107ff8db67749609e7 Add -h/--help args to the GUI (pythcoiner)
Pull request description:
```shell
$ liana-gui -h
Usage: liana-gui [OPTIONS]
Options:
--conf <PATH> Path of configuration file (gui.toml)
--datadir <PATH> Path of liana datadir
-v, --version Display liana-gui version
-h, --help Print help
--bitcoin Use bitcoin network
--testnet Use testnet network
--signet Use signet network
--regtest Use regtest network
```
Closes #1073
ACKs for top commit:
jp1ac4:
Tested ACK 243f4eac0aaf3def57b3a1107ff8db67749609e7.
Tree-SHA512: a046966f40da178fd736bcbe0e8042b03fc671baafab71ea3e1413ece3667f915d40f40437c10ecdd27476454d3e552760ac0d2c5d5bc8b21a0b519980cfa9b6
This commit is contained in:
commit
0c1c82984c
@ -44,6 +44,25 @@ fn parse_args(args: Vec<String>) -> Result<Vec<Arg>, Box<dyn Error>> {
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
if args.len() > 1 && (args[1] == "--help" || args[1] == "-h") {
|
||||
eprintln!(
|
||||
r#"
|
||||
Usage: liana-gui [OPTIONS]
|
||||
|
||||
Options:
|
||||
--conf <PATH> Path of configuration file (gui.toml)
|
||||
--datadir <PATH> Path of liana datadir
|
||||
-v, --version Display liana-gui version
|
||||
-h, --help Print help
|
||||
--bitcoin Use bitcoin network
|
||||
--testnet Use testnet network
|
||||
--signet Use signet network
|
||||
--regtest Use regtest network
|
||||
"#
|
||||
);
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
for (i, arg) in args.iter().enumerate() {
|
||||
if arg == "--conf" {
|
||||
if let Some(a) = args.get(i + 1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user