File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8- ## [ Unreleased ]
8+ ## [ 0.0.4 ] - 2024-09-13
99
1010### Changed
1111
1212- Reduced minimum search requirement to a single character.
1313- Added a slight input delay to smooth out processing.
14+ - Typing ` src ` without a space or any argument—or just a bunch of spaces—now lists all folders by default.
1415
1516## [ 0.0.3] - 2024-09-13
1617
Original file line number Diff line number Diff line change 138138 <key >type </key >
139139 <integer >5 </integer >
140140 <key >withspace </key >
141- <true />
141+ <false />
142142 </dict >
143143 <key >type </key >
144144 <string >alfred.workflow.input.scriptfilter </string >
Original file line number Diff line number Diff line change 88$ workflow = new Workflow ();
99$ workflow ->logger ()->info ('PHP version: ' .phpversion ());
1010
11- if (! $ workflow ->argument ()) {
12- return ;
13- }
14-
1511if (empty ($ workflow ->env ('SEARCH_PATHS ' ))) {
1612 return ;
1713}
5248 'threshold ' => 0.3 ,
5349]);
5450
55- // Rock and roll
56- $ results = $ fuse ->search ($ workflow ->argument ());
57- $ workflow ->logger ()->info ('Matching results: ' .count ($ results ));
51+ $ keyword = trim ($ workflow ->argument () ?? '' );
52+
53+ if (empty ($ keyword )) {
54+ $ results = [];
55+
56+ foreach ($ fuse ->getCollection () as $ item ) {
57+ $ results [] = [
58+ 'item ' => $ item ,
59+ ];
60+ }
61+ } else {
62+ // Rock and roll
63+ $ results = $ fuse ->search ($ keyword );
64+ $ workflow ->logger ()->info ('Matching results: ' .count ($ results ));
65+ }
5866
5967foreach ($ results as $ result ) {
6068 $ workflow ->item ()
You can’t perform that action at this time.
0 commit comments