~/talk

Ruby on the Command Line

Talkat Rocky Mountain Ruby 2012 · 2012-09-19..09-21· [ruby, developer-experience]
links:none on file
slides:none on file

Builds a cat-like Ruby CLI that prints files or their sprintf binary output and accepts multiple file args. Uses OptionParser with a -b flag, shebang plus chmod so it runs without ruby prepended, and defaults to stdin when no args or dash is given. Adds graceful error handling: rescue prints message and exit 1, -d shows stack traces, Interrupt returns 130, rescue for EPIPE exits 0. Shows adding to PATH, installing a man page, and links to a gist and testing helpers.

AI-written summary · about

  1. 0:00Introduction
  2. 0:30Printf
  3. 1:10Option Processor
  4. 1:50Printing the binary
  5. 2:10Making it executable
  6. 2:50Debugging
  7. 3:50Standard in
  8. 4:35Interrupts
  9. 4:55Closed Pipes
  10. 5:10Export Path
  11. 5:20Man Pages
  12. 5:35Export
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.