@kaynooo/cli-pick 0.11.0 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/dist/pick.js +956 -668
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -19,3 +19,5 @@ Keys: type to filter, up and down or ctrl-p and ctrl-n to move, enter to pick, e
19
19
  The query matches as a subsequence, best first: a word start, a run of consecutive characters or a prefix scores higher, a lowercase query ignores case and an uppercase letter makes it exact. Keys come from `/dev/tty` and the selector is drawn on stderr, so a pipe or a command substitution takes only the choice. Without a terminal on stderr it exits 2.
20
20
 
21
21
  The same picker is what `gb`, `dx`, `sf` and `j` use, with `--expect` keys, the query back, hidden fields and reloads: its engine is `@kaynooo/cli-kit/picker`, so none of them needs fzf.
22
+
23
+ Fields follow fzf's syntax, 1-based: `2`, `-1` the last, `2..`, `..3`, `2..4`, comma-separated. `--delimiter` is a regex (whitespace by default), `--nth` names the fields the query is matched against and `--with-nth` the ones shown, and the printed line is always the whole input line. `--read0` reads NUL-separated lines and `--print0` ends each printed one with NUL. `--filter <query>` prints every match best first with no terminal, `--select-1` prints the only match without opening the selector, `--exit-0` exits 1 at once when nothing matches. `--preview` output is cut at 64 KiB and 200 lines. Without a terminal on stderr it prints the best line the query matches, as the selector would rank it, or every match best first with `--multi`.