Sha256: e359b1ed70566d3a872a33a30f9e6060e6313a9718961b519f3c5ddd5847e4e0
Contents?: true
Size: 547 Bytes
Versions: 2
Compression:
Stored size: 547 Bytes
Contents
#!/usr/bin/env ruby # # this script is inspired by the various incarnations of # a similar `pick` utility developed by Kernighan & Pike # in their seminal "The UNIX Programming Environment"... # lib = File.expand_path('../lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'consenter' nul = ARGV.delete('-0') || ARGV.delete('-print0') || ARGV.delete('--print0') consented = ARGF.lazy.map(&:chomp).each_consented('Pick "%s"?').to_a if nul print consented.join("\0") else puts consented end # That's all Folks!
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
consenter-1.0.6 | exe/pick |
consenter-1.0.5 | exe/pick |