Sha256: 209e05f7446fa6e36ee3d11c9b4bdf9eff127457e10aa9903ce505fc24943b93

Contents?: true

Size: 618 Bytes

Versions: 2

Compression:

Stored size: 618 Bytes

Contents

require 'cliprompt'
require 'configstruct'

module Shellplay
  class Config < ConfigStruct

    include Cliprompt

    def set_defaults
      default :basedir, File.join(ENV['HOME'], '.shellplay')
      super
    end

    def setup
      values = {}
      output.puts Paint['Create a new shellplay configuration:', :blue]
      values['editor'] = guess 'EDITOR', 'What is the path to launch your text editor?', 'vim'
      values['prompt'] = ask 'What is the default prompt you want to use?'
      values['timeformat'] = ask 'What is the time format you want to display?', '%.1f'
      write values
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shellplay-0.0.7 lib/shellplay/config.rb
shellplay-0.0.6 lib/shellplay/config.rb