We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49cec58 commit defddb8Copy full SHA for defddb8
libs/fzf/src/fzf/Fzf.hx
@@ -12,6 +12,7 @@ import fzf.WordNav;
12
13
typedef FzfOptions = {
14
@:optional var prompt:String;
15
+ @:optional var initialSearch:String;
16
@:optional var geom:{width:Int, height:Int};
17
}
18
@@ -89,6 +90,12 @@ class Fzf {
89
90
// TODO: find a way to have a proper _new_ tty
91
if (options.geom == null) this.tty = Tty.init(Loop.defaultLoop(), File.stderr).resolve();
92
93
+ if (options.initialSearch ?? "" != "") {
94
+ currentFilter = options.initialSearch;
95
+ cursor = currentFilter.length;
96
+ updateFilter();
97
+ }
98
+
99
var esc = [];
100
while (true) {
101
redraw();
0 commit comments