Sha256: 926db4c458df015762002e248ebe6369677d04cafd36a4dc9a38b6000d26ff72

Contents?: true

Size: 327 Bytes

Versions: 2

Compression:

Stored size: 327 Bytes

Contents

module Termvana
  class CdCommand < Command
    type :builtin
    response :none
    name "cd"
    def call
      dir = request[1] || "~"
      Dir.chdir(environment.fullpath(dir))
      environment.env["PWD"] = environment.cwd = Dir.pwd
      finish
    end
  end
end

Termvana::CommandProcessor.register(Termvana::CdCommand)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
termvana-0.2.0.beta2 lib/termvana/app/commands/cd.rb
termvana-0.2.0.beta1 lib/termvana/app/commands/cd.rb