Skip to content

Commit 1110304

Browse files
committed
Reword CLI help messages + add lock command
1 parent 3838cc7 commit 1110304

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/cli.cr

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ module Shards
77
shards [<options>...] [<command>]
88
99
Commands:
10-
build [<targets>] [<options>] - Builds the specified <targets> in `bin` path.
11-
check - Verifies all dependencies are installed.
12-
init - Initializes a shard folder.
13-
install - Installs dependencies from `shard.lock` file.
14-
list [--tree] - Lists installed dependencies.
15-
outdated [--pre] - Lists dependencies that are outdated.
16-
prune - Removes unused dependencies from `lib` folder.
17-
update [<shard>, ...] - Updates dependencies and `shard.lock`.
18-
version [<path>] - Prints the current version of the shard.
10+
build [<targets>] [<options>] - Build the specified <targets> in `bin` path.
11+
check - Verify all dependencies are installed.
12+
init - Initialize a `shard.yml` file.
13+
install - Install dependencies, creating or using the `shard.lock` file.
14+
list [--tree] - List installed dependencies.
15+
lock [--update] [<shards>] - Lock dependencies in `shard.lock` but doesn't install them.
16+
outdated [--pre] - List dependencies that are outdated.
17+
prune - Remove unused dependencies from `lib` folder.
18+
update [<shards>] - Update dependencies and `shard.lock`.
19+
version [<path>] - Print the current version of the shard.
1920
2021
Options:
2122
HELP
@@ -28,12 +29,12 @@ module Shards
2829
path = Dir.current
2930

3031
opts.on("--no-color", "Disable colored output.") { self.colors = false }
31-
opts.on("--version", "Prints the `shards` version.") { puts self.version_string; exit }
32+
opts.on("--version", "Print the `shards` version.") { puts self.version_string; exit }
3233
opts.on("--production", "Run in release mode. No development dependencies and strict sync between shard.yml and shard.lock.") { self.production = true }
3334
opts.on("--local", "Don't update remote repositories, use the local cache only.") { self.local = true }
34-
opts.on("-v", "--verbose", "Increases the log verbosity, printing all debug statements.") { self.logger.level = Logger::Severity::DEBUG }
35-
opts.on("-q", "--quiet", "Decreases the log verbosity, printing only warnings and errors.") { self.logger.level = Logger::Severity::WARN }
36-
opts.on("-h", "--help", "Prints usage synopsis.") { self.display_help_and_exit(opts) }
35+
opts.on("-v", "--verbose", "Increase the log verbosity, printing all debug statements.") { self.logger.level = Logger::Severity::DEBUG }
36+
opts.on("-q", "--quiet", "Decrease the log verbosity, printing only warnings and errors.") { self.logger.level = Logger::Severity::WARN }
37+
opts.on("-h", "--help", "Print usage synopsis.") { self.display_help_and_exit(opts) }
3738

3839
opts.unknown_args do |args, options|
3940
case args[0]? || DEFAULT_COMMAND

0 commit comments

Comments
 (0)