Sha256: 0c4beb90c51c54da3e8676df5d898819f8ef6b9c8978638f4eb911d8795e72e3
Contents?: true
Size: 913 Bytes
Versions: 47
Compression:
Stored size: 913 Bytes
Contents
require "thor" # Override thor's long_desc identation behavior # https://github.com/erikhuda/thor/issues/398 class Thor module Shell class Basic def print_wrapped(message, options = {}) message = "\n#{message}" unless message[0] == "\n" stdout.puts message end end end end module Lambdagem class Command < Thor class << self def dispatch(m, args, options, config) # Allow calling for help via: # lambdagem command help # lambdagem command -h # lambdagem command --help # lambdagem command -D # # as well thor's normal way: # # lambdagem help command help_flags = Thor::HELP_MAPPINGS + ["help"] if args.length > 1 && !(args & help_flags).empty? args -= help_flags args.insert(-2, "help") end super end end end end
Version data entries
47 entries across 47 versions & 1 rubygems