Scroll::SortKey
A parsed --sort-by key selector. Two concrete grammars:
Field— an integer, the Nth whitespace-separated column (1-based).Pattern— a slash-delimited/regex/; the key is the named capturesortif present, else the first capture group, else the whole match.
nil (no --sort-by) means the key is the whole line; that case is handled
by the Sorter, not represented here.
Constructors
new
SourceInstance methods
Extract the key substring from one line. Returns "" when the selector
does not apply to the line (out-of-range column, or a non-matching regex);
an empty key sorts first (ascending) / into the non-numeric bucket.
initialize
Source