Sha256: a0454f39f05dce1b74a108348851b0f17572c2dfa9405274c8103e261a33ee3a

Contents?: true

Size: 975 Bytes

Versions: 1

Compression:

Stored size: 975 Bytes

Contents

# frozen_string_literal: true

module Pytty
  module Client
    module Cli
      class RootCommand < Clamp::Command
        banner "🧻  pytty #{Pytty::VERSION}"

        option ['-v', '--version'], :flag, "Show version information" do
          puts Pytty::VERSION
          exit 0
        end

        subcommand ["version"], "Show version information", Pytty::Common::Cli::VersionCommand
        subcommand ["run"], "run", RunCommand
        subcommand ["yield"], "yield", YieldCommand
        subcommand ["ps"], "ps", PsCommand
        subcommand ["rm"], "rm", RmCommand
        subcommand ["spawn"], "spawn", SpawnCommand
        subcommand ["signal"], "signal", SignalCommand
        subcommand ["attach"], "attach", AttachCommand
        subcommand ["stdout"], "stdout", StdoutCommand

        def self.run
          super
        rescue StandardError => exc
          warn exc.message
          warn exc.backtrace.join("\n")
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pytty-0.4.1 lib/pytty/client/cli/root_command.rb