Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
cmd/plg: update description for filters
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrlsnchs committed May 1, 2020
1 parent 648f3f1 commit 7d4a307
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 143 deletions.
24 changes: 13 additions & 11 deletions cmd/plg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func run() int {
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of tags. Targets with these tags will also be checked.",
Short: 't',
ArgLabel: "TAG 1,...,TAG n",
},
Recipient: &root.check.tags,
},
Expand Down Expand Up @@ -123,19 +124,18 @@ func run() int {
},
"include": cli.VarOption{
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of targets to be included when scanning the target.",
ArgLabel: "TARGET 1,...,TARGET n",
Description: "File to be included as a target. Repeat option to include more files.",
ArgLabel: "FILE",
},
Recipient: &root.config.read.include,
},
"exclude": cli.VarOption{
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of targets to be excluded when scanning the target.",
ArgLabel: "TARGET 1,...,TARGET n",
Description: "File to be excluded from targets. Repeat option to exclude more files.",
ArgLabel: "FILE",
},
Recipient: &root.config.read.exclude,
},

"scanhidden": cli.BoolOption{
OptionDetails: cli.OptionDetails{
Description: "Include hidden files when scanning the target.",
Expand All @@ -146,7 +146,8 @@ func run() int {
"tags": cli.VarOption{
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of tags to be set for the target.",
Short: 't',
Short: 't',
ArgLabel: "TAG 1,...,TAG n",
},
Recipient: &root.config.tags,
},
Expand All @@ -170,19 +171,18 @@ func run() int {
},
"include": cli.VarOption{
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of targets to be included from initialization.",
ArgLabel: "TARGET 1,...,TARGET n",
Description: "File to be included as a target. Repeat option to include more files.",
ArgLabel: "FILE",
},
Recipient: &root.init.read.include,
},
"exclude": cli.VarOption{
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of targets to be excluded from initialization.",
ArgLabel: "TARGET 1,...,TARGET n",
Description: "File to be excluded from targets. Repeat option to exclude more files.",
ArgLabel: "FILE",
},
Recipient: &root.init.read.exclude,
},

"hidden": cli.BoolOption{
OptionDetails: cli.OptionDetails{
Description: "Include hidden files on initialization.",
Expand All @@ -201,6 +201,7 @@ func run() int {
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of tags. Targets with these tags will also be linked.",
Short: 't',
ArgLabel: "TAG 1,...,TAG n",
},
Recipient: &root.link.tags,
},
Expand All @@ -214,6 +215,7 @@ func run() int {
OptionDetails: cli.OptionDetails{
Description: "Comma-separated list of tags. Targets with these tags will also be shown.",
Short: 't',
ArgLabel: "TAG 1,...,TAG n",
},
Recipient: &root.show.tags,
},
Expand Down
12 changes: 6 additions & 6 deletions cmd/plg/testdata/TestCLI/darwin/check.ct
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ USAGE:
check [OPTIONS]

OPTIONS:
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be checked.
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be checked.

$ plg check -h
Check the status of your dotfiles.
Expand All @@ -16,9 +16,9 @@ USAGE:
check [OPTIONS]

OPTIONS:
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be checked.
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be checked.

$ plg check --> FAIL
plg: open pilgo.yml: no such file or directory
Expand Down
40 changes: 20 additions & 20 deletions cmd/plg/testdata/TestCLI/darwin/config.ct
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ USAGE:
config [OPTIONS] [TARGET]

OPTIONS:
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded when scanning the target.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included when scanning the target.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <FILE> File to be included as a target. Repeat option to include more files.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.

$ plg config -h
Configure a dotfile in the configuration file.
Expand All @@ -23,16 +23,16 @@ USAGE:
config [OPTIONS] [TARGET]

OPTIONS:
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded when scanning the target.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included when scanning the target.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <FILE> File to be included as a target. Repeat option to include more files.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.

$ mkdir targets
$ mkdir links
Expand Down
20 changes: 10 additions & 10 deletions cmd/plg/testdata/TestCLI/darwin/init.ct
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ USAGE:
init [OPTIONS]

OPTIONS:
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded from initialization.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included from initialization.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <FILE> File to be included as a target. Repeat option to include more files.

$ plg init -h
Initialize a configuration file.
Expand All @@ -70,8 +70,8 @@ USAGE:
init [OPTIONS]

OPTIONS:
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded from initialization.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included from initialization.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <FILE> File to be included as a target. Repeat option to include more files.
8 changes: 4 additions & 4 deletions cmd/plg/testdata/TestCLI/darwin/link.ct
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ USAGE:
link [OPTIONS]

OPTIONS:
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be linked.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be linked.

$ plg link -h
Link your dotfiles as set in the configuration file.
Expand All @@ -15,8 +15,8 @@ USAGE:
link [OPTIONS]

OPTIONS:
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be linked.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be linked.

$ plg link --> FAIL
plg: open pilgo.yml: no such file or directory
Expand Down
8 changes: 4 additions & 4 deletions cmd/plg/testdata/TestCLI/darwin/show.ct
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ USAGE:
show [OPTIONS]

OPTIONS:
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be shown.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be shown.

$ plg show -h
Show your dotfiles in a tree view.
Expand All @@ -15,8 +15,8 @@ USAGE:
show [OPTIONS]

OPTIONS:
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be shown.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be shown.

$ plg show --> FAIL
plg: open pilgo.yml: no such file or directory
Expand Down
12 changes: 6 additions & 6 deletions cmd/plg/testdata/TestCLI/linux/check.ct
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ USAGE:
check [OPTIONS]

OPTIONS:
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be checked.
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be checked.

$ plg check -h
Check the status of your dotfiles.
Expand All @@ -16,9 +16,9 @@ USAGE:
check [OPTIONS]

OPTIONS:
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be checked.
-f, -fail Return an error if there are any conflicts.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be checked.

$ plg check --> FAIL
plg: open pilgo.yml: no such file or directory
Expand Down
40 changes: 20 additions & 20 deletions cmd/plg/testdata/TestCLI/linux/config.ct
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ USAGE:
config [OPTIONS] [TARGET]

OPTIONS:
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded when scanning the target.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included when scanning the target.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <FILE> File to be included as a target. Repeat option to include more files.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.

$ plg config -h
Configure a dotfile in the configuration file.
Expand All @@ -23,16 +23,16 @@ USAGE:
config [OPTIONS] [TARGET]

OPTIONS:
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded when scanning the target.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included when scanning the target.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.
-b, -basedir <DIR> Set the target's base directory. Works recursively for all nested targets, unless overridden.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -flatten Prevent the target from being included in the link name.
-h, -help Print this help message.
-include <FILE> File to be included as a target. Repeat option to include more files.
-l, -link <NAME> Set the target's link name.
-s, -scandir Scan the target and set its files as its own targets.
-S, -scanhidden Include hidden files when scanning the target.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags to be set for the target.
-H, -usehome Use home directory as the target's base directory and recursively for all nested targets, unless overridden.

$ mkdir targets
$ mkdir links
Expand Down
20 changes: 10 additions & 10 deletions cmd/plg/testdata/TestCLI/linux/init.ct
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ USAGE:
init [OPTIONS]

OPTIONS:
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded from initialization.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included from initialization.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <FILE> File to be included as a target. Repeat option to include more files.

$ plg init -h
Initialize a configuration file.
Expand All @@ -70,8 +70,8 @@ USAGE:
init [OPTIONS]

OPTIONS:
-exclude <TARGET 1,...,TARGET n> Comma-separated list of targets to be excluded from initialization.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <TARGET 1,...,TARGET n> Comma-separated list of targets to be included from initialization.
-exclude <FILE> File to be excluded from targets. Repeat option to exclude more files.
-f, -force Overwrite the existing configuration file.
-h, -help Print this help message.
-H, -hidden Include hidden files on initialization.
-include <FILE> File to be included as a target. Repeat option to include more files.
8 changes: 4 additions & 4 deletions cmd/plg/testdata/TestCLI/linux/link.ct
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ USAGE:
link [OPTIONS]

OPTIONS:
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be linked.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be linked.

$ plg link -h
Link your dotfiles as set in the configuration file.
Expand All @@ -15,8 +15,8 @@ USAGE:
link [OPTIONS]

OPTIONS:
-h, -help Print this help message.
-t, -tags Comma-separated list of tags. Targets with these tags will also be linked.
-h, -help Print this help message.
-t, -tags <TAG 1,...,TAG n> Comma-separated list of tags. Targets with these tags will also be linked.

$ plg link --> FAIL
plg: open pilgo.yml: no such file or directory
Expand Down

0 comments on commit 7d4a307

Please sign in to comment.