class GitWish
Public Instance Methods
aliases()
click to toggle source
# File lib/git_xplorer/wish/git_wish.rb, line 4 def aliases return ["git"] end
description()
click to toggle source
# File lib/git_xplorer/wish/git_wish.rb, line 8 def description return "Run any git command" end
execute(args, djinni_env = Hash.new)
click to toggle source
# File lib/git_xplorer/wish/git_wish.rb, line 12 def execute(args, djinni_env = Hash.new) gitx = djinni_env["gitXplorer"] begin case args when /^\s*(diff|ls-files|rev-parse|show|status).*/ puts gitx.git(args, false) else puts gitx.git(args) end rescue GitXplorer::Error => e puts e.message end end
usage()
click to toggle source
# File lib/git_xplorer/wish/git_wish.rb, line 26 def usage puts "#{aliases.join(", ")}" puts " #{description}." end