diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-17 21:32:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-17 21:32:55 +0100 |
commit | 3c218cd76d0b6ff333ff3d404df5217a4e3cba72 (patch) | |
tree | a3af3b0f1c6dea4657dd8ef637e20d026715544e | |
parent | 8ec539fef1c9f6dfbbc48621557d84b842b596dc (diff) |
Add `tootctl --version` (#9835)
-rw-r--r-- | lib/cli.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/cli.rb b/lib/cli.rb index a810c632a..6036adfbe 100644 --- a/lib/cli.rb +++ b/lib/cli.rb @@ -7,6 +7,7 @@ require_relative 'mastodon/accounts_cli' require_relative 'mastodon/feeds_cli' require_relative 'mastodon/settings_cli' require_relative 'mastodon/domains_cli' +require_relative 'mastodon/version' module Mastodon class CLI < Thor @@ -31,5 +32,12 @@ module Mastodon desc 'domains SUBCOMMAND ...ARGS', 'Manage account domains' subcommand 'domains', Mastodon::DomainsCLI + + map %w(--version -v) => :version + + desc 'version', 'Show version' + def version + say(Mastodon::Version.to_s) + end end end |