Skip to content

Commit 0ac1ac8

Browse files
committed
release: v3.7.0
1 parent 7d2efaf commit 0ac1ac8

File tree

9 files changed

+119
-112
lines changed

9 files changed

+119
-112
lines changed

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,58 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.7.0] - 2026-03-08
9+
10+
This adds a new library API: `Skim::run_items`. Using this, you don't need to send the items, the library handles it for you.
11+
12+
Instead of writing this:
13+
14+
```rust
15+
use skim::prelude::*;
16+
let (rx, tx) = unbounded();
17+
18+
// We need MySkimItem to override the set_index/get_index methods
19+
struct MySkimItem {
20+
value: String,
21+
index: usize
22+
}
23+
24+
impl SkimItem for MySkimItem {
25+
// Implement the default members
26+
}
27+
28+
tx.send(MySkimItem { value: String::from("foo"), index: 0 });
29+
tx.send(MySkimItem { value: String::from("bar"), index: 1 });
30+
31+
let res = Skim::run_with(options, Some(rx));
32+
```
33+
34+
You can simply write this:
35+
```rust
36+
use skim::prelude::*;
37+
38+
let res = Skim::run_with(options, ["foo", "bar"]);
39+
```
40+
41+
It will automatically convert any iterator of <impl SkimItem> by adding an `index` field and then send it, before running skim.
42+
43+
44+
45+
### 🚀 Features
46+
47+
- Add `scheme` for better filepath matching in Arinae
48+
- Add Skim::run_items API
49+
50+
### 🐛 Bug Fixes
51+
52+
- Use sum of scores in And engine
53+
- Correctly init rank for and engine
54+
55+
### ⚙️ Miscellaneous Tasks
56+
57+
- Add gungraun benchmark
58+
- Review snapshots
59+
860
## [3.6.2] - 2026-03-04
961

1062
### ⚙️ Miscellaneous Tasks

Cargo.lock

Lines changed: 18 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "skim"
3-
version = "3.6.2"
3+
version = "3.7.0"
44
authors = ["Loric ANDRE", "Zhang Jinzhou <lotabout@gmail.com>"]
55
description = "Fuzzy Finder in rust!"
66
documentation = "https://docs.rs/skim"

man/man1/sk.1

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.ie \n(.g .ds Aq \(aq
22
.el .ds Aq '
3-
.TH sk 1 "sk 3.6.2"
3+
.TH sk 1 "sk 3.7.0"
44
.ie \n(.g .ds Aq \(aq
55
.el .ds Aq '
66
.SH NAME
77
sk \- Fuzzy Finder in rust!
88
.ie \n(.g .ds Aq \(aq
99
.el .ds Aq '
1010
.SH SYNOPSIS
11-
\fBsk\fR [\fB\-\-tac\fR] [\fB\-\-min\-query\-length\fR] [\fB\-\-no\-sort\fR] [\fB\-t\fR|\fB\-\-tiebreak\fR] [\fB\-n\fR|\fB\-\-nth\fR] [\fB\-\-with\-nth\fR] [\fB\-d\fR|\fB\-\-delimiter\fR] [\fB\-e\fR|\fB\-\-exact\fR] [\fB\-\-regex\fR] [\fB\-\-algo\fR] [\fB\-\-case\fR] [\fB\-\-typos\fR] [\fB\-\-no\-typos\fR] [\fB\-\-normalize\fR] [\fB\-\-split\-match\fR] [\fB\-b\fR|\fB\-\-bind\fR] [\fB\-m\fR|\fB\-\-multi\fR] [\fB\-\-no\-multi\fR] [\fB\-\-no\-mouse\fR] [\fB\-c\fR|\fB\-\-cmd\fR] [\fB\-i\fR|\fB\-\-interactive\fR] [\fB\-I \fR] [\fB\-\-color\fR] [\fB\-\-no\-hscroll\fR] [\fB\-\-keep\-right\fR] [\fB\-\-skip\-to\-pattern\fR] [\fB\-\-no\-clear\-if\-empty\fR] [\fB\-\-no\-clear\-start\fR] [\fB\-\-no\-clear\fR] [\fB\-\-show\-cmd\-error\fR] [\fB\-\-cycle\fR] [\fB\-\-disabled\fR] [\fB\-\-layout\fR] [\fB\-\-reverse\fR] [\fB\-\-height\fR] [\fB\-\-no\-height\fR] [\fB\-\-min\-height\fR] [\fB\-\-margin\fR] [\fB\-p\fR|\fB\-\-prompt\fR] [\fB\-\-cmd\-prompt\fR] [\fB\-\-selector\fR] [\fB\-\-multi\-selector\fR] [\fB\-\-ansi\fR] [\fB\-\-tabstop\fR] [\fB\-\-info\fR] [\fB\-\-no\-info\fR] [\fB\-\-inline\-info\fR] [\fB\-\-header\fR] [\fB\-\-header\-lines\fR] [\fB\-\-border\fR] [\fB\-\-wrap\fR] [\fB\-\-history\fR] [\fB\-\-history\-size\fR] [\fB\-\-cmd\-history\fR] [\fB\-\-cmd\-history\-size\fR] [\fB\-\-preview\fR] [\fB\-\-preview\-window\fR] [\fB\-q\fR|\fB\-\-query\fR] [\fB\-\-cmd\-query\fR] [\fB\-\-read0\fR] [\fB\-\-print0\fR] [\fB\-\-print\-query\fR] [\fB\-\-print\-cmd\fR] [\fB\-\-print\-score\fR] [\fB\-\-print\-header\fR] [\fB\-\-print\-current\fR] [\fB\-\-output\-format\fR] [\fB\-\-no\-strip\-ansi\fR] [\fB\-1\fR|\fB\-\-select\-1\fR] [\fB\-0\fR|\fB\-\-exit\-0\fR] [\fB\-\-sync\fR] [\fB\-\-pre\-select\-n\fR] [\fB\-\-pre\-select\-pat\fR] [\fB\-\-pre\-select\-items\fR] [\fB\-\-pre\-select\-file\fR] [\fB\-f\fR|\fB\-\-filter\fR] [\fB\-\-shell\fR] [\fB\-\-shell\-bindings\fR] [\fB\-\-man\fR] [\fB\-\-listen\fR] [\fB\-\-remote\fR] [\fB\-\-tmux\fR] [\fB\-\-log\-level\fR] [\fB\-\-log\-file\fR] [\fB\-\-expect\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
11+
\fBsk\fR [\fB\-\-tac\fR] [\fB\-\-min\-query\-length\fR] [\fB\-\-no\-sort\fR] [\fB\-t\fR|\fB\-\-tiebreak\fR] [\fB\-n\fR|\fB\-\-nth\fR] [\fB\-\-with\-nth\fR] [\fB\-d\fR|\fB\-\-delimiter\fR] [\fB\-e\fR|\fB\-\-exact\fR] [\fB\-\-regex\fR] [\fB\-\-algo\fR] [\fB\-\-case\fR] [\fB\-\-typos\fR] [\fB\-\-no\-typos\fR] [\fB\-\-normalize\fR] [\fB\-\-split\-match\fR] [\fB\-\-last\-match\fR] [\fB\-\-scheme\fR] [\fB\-b\fR|\fB\-\-bind\fR] [\fB\-m\fR|\fB\-\-multi\fR] [\fB\-\-no\-multi\fR] [\fB\-\-no\-mouse\fR] [\fB\-c\fR|\fB\-\-cmd\fR] [\fB\-i\fR|\fB\-\-interactive\fR] [\fB\-I \fR] [\fB\-\-color\fR] [\fB\-\-no\-hscroll\fR] [\fB\-\-keep\-right\fR] [\fB\-\-skip\-to\-pattern\fR] [\fB\-\-no\-clear\-if\-empty\fR] [\fB\-\-no\-clear\-start\fR] [\fB\-\-no\-clear\fR] [\fB\-\-show\-cmd\-error\fR] [\fB\-\-cycle\fR] [\fB\-\-disabled\fR] [\fB\-\-layout\fR] [\fB\-\-reverse\fR] [\fB\-\-height\fR] [\fB\-\-no\-height\fR] [\fB\-\-min\-height\fR] [\fB\-\-margin\fR] [\fB\-p\fR|\fB\-\-prompt\fR] [\fB\-\-cmd\-prompt\fR] [\fB\-\-selector\fR] [\fB\-\-multi\-selector\fR] [\fB\-\-ansi\fR] [\fB\-\-tabstop\fR] [\fB\-\-info\fR] [\fB\-\-no\-info\fR] [\fB\-\-inline\-info\fR] [\fB\-\-header\fR] [\fB\-\-header\-lines\fR] [\fB\-\-border\fR] [\fB\-\-wrap\fR] [\fB\-\-history\fR] [\fB\-\-history\-size\fR] [\fB\-\-cmd\-history\fR] [\fB\-\-cmd\-history\-size\fR] [\fB\-\-preview\fR] [\fB\-\-preview\-window\fR] [\fB\-q\fR|\fB\-\-query\fR] [\fB\-\-cmd\-query\fR] [\fB\-\-read0\fR] [\fB\-\-print0\fR] [\fB\-\-print\-query\fR] [\fB\-\-print\-cmd\fR] [\fB\-\-print\-score\fR] [\fB\-\-print\-header\fR] [\fB\-\-print\-current\fR] [\fB\-\-output\-format\fR] [\fB\-\-no\-strip\-ansi\fR] [\fB\-1\fR|\fB\-\-select\-1\fR] [\fB\-0\fR|\fB\-\-exit\-0\fR] [\fB\-\-sync\fR] [\fB\-\-pre\-select\-n\fR] [\fB\-\-pre\-select\-pat\fR] [\fB\-\-pre\-select\-items\fR] [\fB\-\-pre\-select\-file\fR] [\fB\-f\fR|\fB\-\-filter\fR] [\fB\-\-shell\fR] [\fB\-\-shell\-bindings\fR] [\fB\-\-man\fR] [\fB\-\-listen\fR] [\fB\-\-remote\fR] [\fB\-\-tmux\fR] [\fB\-\-log\-level\fR] [\fB\-\-log\-file\fR] [\fB\-\-expect\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
1212
.ie \n(.g .ds Aq \(aq
1313
.el .ds Aq '
1414
.SH OPTIONS
@@ -45,7 +45,7 @@ Comma\-separated list of sort criteria to apply when the scores are tied.
4545
.br
4646

4747
.br
48-
[\fIpossible values: \fRscore, \-score, begin, \-begin, end, \-end, length, \-length, index, \-index]
48+
[\fIpossible values: \fRscore, \-score, begin, \-begin, end, \-end, length, \-length, index, \-index, pathname, \-pathname]
4949
.TP
5050
\fB\-n\fR, \fB\-\-nth\fR \fI<NTH>\fR [default: ]
5151
Fields to be matched
@@ -139,6 +139,22 @@ When set, normalize accents and other unicode diacritics/others
139139
Enable split matching and set delimiter
140140

141141
Split matching runs the matcher in splits: foo:bar will match all items matching foo, then :, then bar if the delimiter is present, or match normally if not.
142+
.TP
143+
\fB\-\-last\-match\fR
144+
Highlight the last match found, not the first one This makes tiebreak more pertinent on path items where we want to prioritize a match on the last parts
145+
.TP
146+
\fB\-\-scheme\fR \fI<SCHEME>\fR [default: default]
147+
148+
.br
149+
\fIPossible values:\fR
150+
.RS 14
151+
.IP \(bu 2
152+
default: Default scheme, no modifications to the options
153+
.IP \(bu 2
154+
path: Path scheme: will find the furthest match in the item and set pathname as the main tiebreak
155+
.IP \(bu 2
156+
history: History scheme: will force index as the first tiebreak
157+
.RE
142158
.SH INTERFACE
143159
.TP
144160
\fB\-b\fR, \fB\-\-bind\fR [\fI<BIND>...\fR] [default: ]
@@ -1046,4 +1062,4 @@ When using `sk \-\-remote`, pipe in action chains (see the KEYBINDS section), fo
10461062
.ie \n(.g .ds Aq \(aq
10471063
.el .ds Aq '
10481064
.SH VERSION
1049-
v3.6.2
1065+
v3.7.0

shell/completion.bash

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ _sk() {
2323

2424
case "${cmd}" in
2525
sk)
26-
opts="-t -n -d -e -b -m -c -i -I -p -q -1 -0 -f -x -h -V --tac --min-query-length --no-sort --tiebreak --nth --with-nth --delimiter --exact --regex --algo --case --typos --no-typos --normalize --split-match --bind --multi --no-multi --no-mouse --cmd --interactive --color --no-hscroll --keep-right --skip-to-pattern --no-clear-if-empty --no-clear-start --no-clear --show-cmd-error --cycle --disabled --layout --reverse --height --no-height --min-height --margin --prompt --cmd-prompt --selector --multi-selector --ansi --tabstop --ellipsis --info --no-info --inline-info --header --header-lines --border --wrap --history --history-size --cmd-history --cmd-history-size --preview --preview-window --query --cmd-query --read0 --print0 --print-query --print-cmd --print-score --print-header --print-current --output-format --no-strip-ansi --select-1 --exit-0 --sync --pre-select-n --pre-select-pat --pre-select-items --pre-select-file --filter --shell --shell-bindings --man --listen --remote --tmux --log-level --log-file --flags --extended --literal --hscroll-off --filepath-word --jump-labels --no-bold --phony --scheme --tail --style --no-color --padding --border-label --border-label-pos --highlight-line --wrap-sign --no-multi-line --raw --track --gap --gap-line --freeze-left --freeze-right --scroll-off --gutter --gutter-raw --marker-multi-line --scrollbar --no-scrollbar --list-border --list-label --list-label-pos --no-input --info-command --separator --no-separator --ghost --input-border --input-label --input-label-pos --preview-label --preview-label-pos --header-first --header-border --header-lines-border --footer --footer-border --footer-label --footer-label-pos --with-shell --expect --help --version"
26+
opts="-t -n -d -e -b -m -c -i -I -p -q -1 -0 -f -x -h -V --tac --min-query-length --no-sort --tiebreak --nth --with-nth --delimiter --exact --regex --algo --case --typos --no-typos --normalize --split-match --last-match --scheme --bind --multi --no-multi --no-mouse --cmd --interactive --color --no-hscroll --keep-right --skip-to-pattern --no-clear-if-empty --no-clear-start --no-clear --show-cmd-error --cycle --disabled --layout --reverse --height --no-height --min-height --margin --prompt --cmd-prompt --selector --multi-selector --ansi --tabstop --ellipsis --info --no-info --inline-info --header --header-lines --border --wrap --history --history-size --cmd-history --cmd-history-size --preview --preview-window --query --cmd-query --read0 --print0 --print-query --print-cmd --print-score --print-header --print-current --output-format --no-strip-ansi --select-1 --exit-0 --sync --pre-select-n --pre-select-pat --pre-select-items --pre-select-file --filter --shell --shell-bindings --man --listen --remote --tmux --log-level --log-file --flags --extended --literal --hscroll-off --filepath-word --jump-labels --no-bold --phony --tail --style --no-color --padding --border-label --border-label-pos --highlight-line --wrap-sign --no-multi-line --raw --track --gap --gap-line --freeze-left --freeze-right --scroll-off --gutter --gutter-raw --marker-multi-line --scrollbar --no-scrollbar --list-border --list-label --list-label-pos --no-input --info-command --separator --no-separator --ghost --input-border --input-label --input-label-pos --preview-label --preview-label-pos --header-first --header-border --header-lines-border --footer --footer-border --footer-label --footer-label-pos --with-shell --expect --help --version"
2727
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
2828
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
2929
return 0
@@ -34,11 +34,11 @@ _sk() {
3434
return 0
3535
;;
3636
--tiebreak)
37-
COMPREPLY=($(compgen -W "score -score begin -begin end -end length -length index -index" -- "${cur}"))
37+
COMPREPLY=($(compgen -W "score -score begin -begin end -end length -length index -index pathname -pathname" -- "${cur}"))
3838
return 0
3939
;;
4040
-t)
41-
COMPREPLY=($(compgen -W "score -score begin -begin end -end length -length index -index" -- "${cur}"))
41+
COMPREPLY=($(compgen -W "score -score begin -begin end -end length -length index -index pathname -pathname" -- "${cur}"))
4242
return 0
4343
;;
4444
--nth)
@@ -77,6 +77,10 @@ _sk() {
7777
COMPREPLY=($(compgen -f "${cur}"))
7878
return 0
7979
;;
80+
--scheme)
81+
COMPREPLY=($(compgen -W "default path history" -- "${cur}"))
82+
return 0
83+
;;
8084
--bind)
8185
COMPREPLY=($(compgen -f "${cur}"))
8286
return 0
@@ -265,10 +269,6 @@ _sk() {
265269
COMPREPLY=($(compgen -f "${cur}"))
266270
return 0
267271
;;
268-
--scheme)
269-
COMPREPLY=($(compgen -f "${cur}"))
270-
return 0
271-
;;
272272
--tail)
273273
COMPREPLY=($(compgen -f "${cur}"))
274274
return 0

0 commit comments

Comments
 (0)