diff options
author | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2017-11-09 13:19:30 +0000 |
---|---|---|
committer | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2017-11-09 13:19:30 +0000 |
commit | 5172284553ce4ef603793dcda95d8a91e3e8a67d (patch) | |
tree | 0b191329ebe602fae0e0f629a95d1e5201cad612 /equote | |
parent | db16d3b53473a690726a4a42fd957e4f9e9293a5 (diff) |
equote: can now call equote [length [quotechar]]
Diffstat (limited to 'equote')
-rwxr-xr-x | equote | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,7 @@ #!/usr/bin/env ruby -LINELENGTH = (ARGV.shift || 72).to_i +LINELENGTH = (ARGV.shift.chomp || 72).to_i +CHAR = ARGV.shift.chomp || ">" lines = $stdin.readlines @@ -25,7 +26,7 @@ lines = lines.map { |line| lines = lines.flatten lines = lines.map { |line| - "> #{line}" + "#{CHAR} #{line}" } puts lines |