Skip to content

Commit 0966fb8

Browse files
committed
preparing for next release
1 parent 676d798 commit 0966fb8

4 files changed

Lines changed: 25 additions & 7 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ features listed below may be missing from your installation.
122122
```
123123
$ cs -h
124124
code spelunker (cs) code search.
125-
Version 1.2.0
125+
Version 1.3.0
126126
Ben Boyter <[email protected]>
127127
128128
cs recursively searches the current directory using some boolean logic
@@ -138,8 +138,16 @@ Searches by default use AND boolean syntax for all terms
138138
- negate using NOT such as pride NOT prejudice
139139
- regex with toothpick syntax /pr[e-i]de/
140140
141+
Searches can fuzzy match which files are searched by adding
142+
the following syntax
143+
144+
- test file:test
145+
- stuff filename:.go
146+
147+
Files that are searched will be limited to those that fuzzy
148+
match test for the first example and .go for the second.
141149
Example search that uses all current functionality
142-
- darcy NOT collins wickham~1 "ten thousand a year" /pr[e-i]de/
150+
- darcy NOT collins wickham~1 "ten thousand a year" /pr[e-i]de/ file:test
143151
144152
The default input field in tui mode supports some nano commands
145153
- CTRL+a move to the beginning of the input
@@ -182,7 +190,7 @@ You can do exact match with quotes, and do regular expressions using toothpicks.
182190
Example search that uses all current functionality
183191

184192
```shell
185-
cs t NOT something test~1 "ten thousand a year" "/pr[e-i]de/"
193+
cs t NOT something test~1 "ten thousand a year" "/pr[e-i]de/" file:test
186194
```
187195

188196
You can use it in a similar manner to `fzf` in TUI mode if you like, since `cs` will return the matching document path

file.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import (
1616

1717
var dirFilePaths = []string{}
1818
var searchToFileMatchesCache = map[string][]string{}
19-
var searchToFileMatchesCacheMutex = sync.Mutex{}
19+
20+
//var searchToFileMatchesCacheMutex = sync.Mutex{}
2021

2122
func FindFiles(query string) chan *gocodewalker.File {
2223
// TODO enable this again as it seems to have issues

http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func StartHttpServer() {
140140
summaryQueue := make(chan *FileJob, runtime.NumCPU()) // Files that match and need to be displayed
141141

142142
q, fuzzy := PreParseQuery(strings.Fields(query))
143-
143+
144144
fileReaderWorker := NewFileReaderWorker(files, toProcessQueue)
145145
fileReaderWorker.FuzzyMatch = fuzzy
146146
fileSearcher := NewSearcherWorker(toProcessQueue, summaryQueue)

main.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
const (
12-
Version = "1.2.0"
12+
Version = "1.3.0"
1313
)
1414

1515
func main() {
@@ -36,8 +36,17 @@ func main() {
3636
" - negate using NOT such as pride NOT prejudice\n" +
3737
" - regex with toothpick syntax /pr[e-i]de/\n" +
3838
"\n" +
39+
"Searches can fuzzy match which files are searched by adding\n" +
40+
"the following syntax\n" +
41+
"\n" +
42+
" - test file:test\n" +
43+
" - stuff filename:.go\n" +
44+
"\n" +
45+
"Files that are searched will be limited to those that fuzzy\n" +
46+
"match test for the first example and .go for the second." +
47+
"\n" +
3948
"Example search that uses all current functionality\n" +
40-
" - darcy NOT collins wickham~1 \"ten thousand a year\" /pr[e-i]de/\n" +
49+
" - darcy NOT collins wickham~1 \"ten thousand a year\" /pr[e-i]de/ file:test\n" +
4150
"\n" +
4251
"The default input field in tui mode supports some nano commands\n" +
4352
"- CTRL+a move to the beginning of the input\n" +

0 commit comments

Comments
 (0)