Skip to content

Build SQL IN Values

When a file is supplied, leo join reads that .txt or .csv file:

Terminal window
leo join ids.txt
leo join ids.csv
Choose a CSV field and output format, then toggle unique values.
Choose a CSV field and output format, then toggle unique values.View VHS source

Without a file, piped stdin takes priority over the clipboard:

Terminal window
seq 1 10 | leo join
leo join

Text is split on commas or whitespace. CSV input attempts to detect a header and lets you select among fields.

  • Left/Right or h/l: switch CSV fields.
  • Up/Down: switch output formats.
  • u: toggle unique and original values; unique mode preserves first-seen order and is the default.
  • Enter: accept and copy the result to the clipboard.
  • Esc or Ctrl-C: cancel.

The picker offers four formats:

1,2,3
(1,2,3)
id in (1,2,3)
'1','2','3'

Quoted output escapes a single quote inside a value as two single quotes. After confirmation, the command prints the count, a preview, and 已复制到剪贴板. Cancellation prints 已取消 and does not copy a result.