Sha256: ebd1b6ecbd9ab9ae787898c439062963e79c26d9ca2e8f68e80fdb245baa74da

Contents?: true

Size: 258 Bytes

Versions: 5

Compression:

Stored size: 258 Bytes

Contents

require 'ripl/rc/u'

module Ripl::Rc::CtrldNewline
  include Ripl::Rc::U

  # make ctrl-d end with a newline
  def after_loop
    return super if CtrldNewline.disabled?
    puts unless @input
    super
  end
end

Ripl::Shell.include(Ripl::Rc::CtrldNewline)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ripl-rc-0.2.4 lib/ripl/rc/ctrld_newline.rb
ripl-rc-0.2.3 lib/ripl/rc/ctrld_newline.rb
ripl-rc-0.2.2 lib/ripl/rc/ctrld_newline.rb
ripl-rc-0.2.1 lib/ripl/rc/ctrld_newline.rb
ripl-rc-0.2.0 lib/ripl/rc/ctrld_newline.rb