summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2018-11-08 09:32:27 +0000
committerNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2018-11-08 09:32:27 +0000
commit509096c4cee49710c9910668ac45d23e2ec825aa (patch)
tree1fea03d51a908d478f099f2dbf4168710c5b2a03
parent3633071bbe2b6d86dd0f6ae1180663d1da843ada (diff)
[equote] handle nils nicely
-rwxr-xr-xequote4
1 files changed, 2 insertions, 2 deletions
diff --git a/equote b/equote
index 3fb5a85..1babbf6 100755
--- a/equote
+++ b/equote
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
-LINELENGTH = (ARGV.shift.chomp || 72).to_i
-CHAR = ARGV.shift.chomp || ">"
+LINELENGTH = (ARGV.shift&.chomp || 72).to_i
+CHAR = ARGV.shift&.chomp || ">"
lines = $stdin.readlines