Sha256: 42c9cf91483b7558892c056dc574317d1bf63062e595c45c34127b20fea6dc5c

Contents?: true

Size: 617 Bytes

Versions: 18

Compression:

Stored size: 617 Bytes

Contents

#!/usr/bin/env ruby
# encoding: utf-8

# overwrite.rb
#
#  Created by Jeremy Hinegardner on 2007-01-24
#  Copyright 2007 Jeremy Hinegardner.  All rights reserved

require "rubygems"
require "highline/import"

puts "Using: #{HighLine.default_instance.terminal.class}"
puts

prompt = "here is your password:"
ask(
  "#{prompt} <%= color('mypassword', RED, BOLD) %> (Press Any Key to blank) "
) do |q|
  q.overwrite = true
  q.echo      = false  # overwrite works best when echo is false.
  q.character = true   # if this is set to :getc then overwrite does not work
end
say("<%= color('Look! blanked out!', GREEN) %>")

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
highline-3.1.2 examples/overwrite.rb
highline-3.1.1 examples/overwrite.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/highline-3.0.1/examples/overwrite.rb
highline-3.1.0 examples/overwrite.rb
highline-3.0.1 examples/overwrite.rb
highline-3.0.0 examples/overwrite.rb
highline-3.0.0.pre.1 examples/overwrite.rb
highline-2.1.0 examples/overwrite.rb
highline-2.0.3 examples/overwrite.rb
highline-2.0.2 examples/overwrite.rb
highline-2.0.1 examples/overwrite.rb
highline-2.0.0 examples/overwrite.rb
highline-2.0.0.pre.develop.16 examples/overwrite.rb
highline-2.0.0.pre.develop.15 examples/overwrite.rb
highline-2.0.0.pre.develop.14 examples/overwrite.rb
highline-2.0.0.pre.develop.13 examples/overwrite.rb
highline-2.0.0.pre.develop.12 examples/overwrite.rb
highline-2.0.0.pre.develop.11 examples/overwrite.rb