Added command to display current version of homesick.
This commit is contained in:
@@ -4,9 +4,11 @@ require 'thor'
|
||||
class Homesick < Thor
|
||||
autoload :Shell, 'homesick/shell'
|
||||
autoload :Actions, 'homesick/actions'
|
||||
autoload :Version, 'homesick/version'
|
||||
|
||||
include Thor::Actions
|
||||
include Homesick::Actions
|
||||
include Homesick::Version
|
||||
|
||||
add_runtime_options!
|
||||
|
||||
@@ -15,6 +17,9 @@ class Homesick < Thor
|
||||
|
||||
DEFAULT_CASTLE_NAME = 'dotfiles'
|
||||
|
||||
map '-v' => :version
|
||||
map '--version' => :version
|
||||
|
||||
def initialize(args = [], options = {}, config = {})
|
||||
super
|
||||
self.shell = Homesick::Shell.new
|
||||
@@ -264,6 +269,11 @@ class Homesick < Thor
|
||||
end
|
||||
end
|
||||
|
||||
desc 'version', 'Display the current version of homesick'
|
||||
def version
|
||||
say Homesick::Version::STRING
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def home_dir
|
||||
|
||||
Reference in New Issue
Block a user