Skip to content

Commit 5e7ce76

Browse files
committed
Indicate options position for all commands
1 parent 9f1d1d9 commit 5e7ce76

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

lib/imap/backup/cli.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def mirror(source_email, destination_email)
220220
desc "remote SUBCOMMAND [OPTIONS]", "View info about online accounts"
221221
subcommand "remote", Remote
222222

223-
desc "restore EMAIL", "Restores a single account"
223+
desc "restore EMAIL [OPTIONS]", "Restores a single account"
224224
long_desc <<~DESC
225225
Restores all backed-up emails for the supplied account to
226226
their original server.
@@ -236,7 +236,7 @@ def restore(email = nil)
236236
Restore.new(email, non_logging_options).run
237237
end
238238

239-
desc "setup", "Configure imap-backup"
239+
desc "setup [OPTIONS]", "Configure imap-backup"
240240
long_desc <<~DESC
241241
A menu-driven command-line application used to configure imap-backup.
242242
Configure email accounts to back up.

lib/imap/backup/cli/local.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CLI::Local < Thor
1515
include Thor::Actions
1616
include CLI::Helpers
1717

18-
desc "accounts", "List locally backed-up accounts"
18+
desc "accounts [OPTIONS]", "List locally backed-up accounts"
1919
config_option
2020
format_option
2121
quiet_option
@@ -34,7 +34,7 @@ def accounts
3434
end
3535

3636
desc(
37-
"check",
37+
"check [OPTIONS]",
3838
"Check the integrity of backups for all accounts (or the selected account(s))"
3939
)
4040
method_option(
@@ -54,7 +54,7 @@ def check
5454
Check.new(non_logging_options).run
5555
end
5656

57-
desc "folders EMAIL", "List backed up folders"
57+
desc "folders EMAIL [OPTIONS]", "List backed up folders"
5858
config_option
5959
format_option
6060
quiet_option
@@ -76,7 +76,7 @@ def folders(email)
7676
end
7777
end
7878

79-
desc "list EMAIL FOLDER", "List emails in a folder"
79+
desc "list EMAIL FOLDER [OPTIONS]", "List emails in a folder"
8080
config_option
8181
format_option
8282
quiet_option
@@ -101,7 +101,7 @@ def list(email, folder_name)
101101
end
102102
end
103103

104-
desc "show EMAIL FOLDER UID[,UID]", "Show one or more emails"
104+
desc "show EMAIL FOLDER UID[,UID] [OPTIONS]", "Show one or more emails"
105105
long_desc <<~DESC
106106
Prints out the requested emails.
107107
If more than one UID is given, they are separated by a header indicating

lib/imap/backup/cli/remote.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CLI::Remote < Thor
1313
include Thor::Actions
1414
include CLI::Helpers
1515

16-
desc "folders EMAIL", "List account folders"
16+
desc "folders EMAIL [OPTIONS]", "List account folders"
1717
config_option
1818
format_option
1919
quiet_option
@@ -31,7 +31,7 @@ def folders(email)
3131
end
3232
end
3333

34-
desc "capabilities EMAIL", "List server capabilities"
34+
desc "capabilities EMAIL [OPTIONS]", "List server capabilities"
3535
long_desc <<~DESC
3636
Lists the IMAP capabilities supported by the IMAP server.
3737
DESC
@@ -49,7 +49,7 @@ def capabilities(email)
4949
Kernel.puts capabilities.join(", ")
5050
end
5151

52-
desc "namespaces EMAIL", "List account namespaces"
52+
desc "namespaces EMAIL [OPTIONS]", "List account namespaces"
5353
long_desc <<~DESC
5454
Lists namespaces defined for an email account.
5555

lib/imap/backup/cli/single.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CLI < Thor; end
1414
class CLI::Single < Thor
1515
include CLI::Helpers
1616

17-
desc "backup", "Backup a single email account based on command-line parameters"
17+
desc "backup [OPTIONS]", "Backup a single email account based on command-line parameters"
1818
long_desc <<~DESC
1919
This is a "stand-alone" backup command that doesn't require
2020
a configuration file.

lib/imap/backup/cli/utils.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ class CLI::Utils < Thor
1818
include Thor::Actions
1919
include CLI::Helpers
2020

21-
desc "ignore-history EMAIL", "Skip downloading emails up to today for all configured folders"
21+
desc(
22+
"ignore-history EMAIL [OPTIONS]",
23+
"Skip downloading emails up to today for all configured folders"
24+
)
2225
config_option
2326
quiet_option
2427
verbose_option

0 commit comments

Comments
 (0)