Skip to content

Commit da37b89

Browse files
committed
tweak to include better examples in help dialog
1 parent 7d4f033 commit da37b89

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Why use cs?
2222
- Rank results on the fly helping you find things
2323
- Searches across multiple lines
2424
- Has a nice TUI interface.
25+
- Cross-platform (probably needs the new Windows terminal though)
2526

2627
The reason `cs` exists at all is because I was running into limitations using `rg TERM | fzf` and decided to solve my own
2728
problem.
@@ -118,15 +119,24 @@ Command line usage of `cs` is designed to be as simple as possible.
118119
Full details can be found in `cs --help` or `cs -h`. Note that the below reflects the state of master not a release, as such
119120
features listed below may be missing from your installation.
120121

121-
```shell
122+
```
122123
$ cs -h
123124
code spelunker (cs) code search.
124-
Version 1.0.0
125+
Version 1.1.1
125126
Ben Boyter <[email protected]>
126127
127128
cs recursively searches the current directory using some boolean logic
128129
optionally combined with regular expressions.
129130
131+
searches by default use AND boolean syntax for all terms
132+
- exact match using quotes "find this"
133+
- fuzzy match within 1 or 2 distance fuzzy~1 fuzzy~2
134+
- negate using NOT such as pride NOT prejudice
135+
- regex with toothpick syntax /pr[e-i]de/
136+
137+
example search that uses all current functionality
138+
- darcy NOT collins wickham~1 "ten thousand a year" "/pr[e-i]de/"
139+
130140
Usage:
131141
cs [flags]
132142

main.go

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

1010
const (
11-
Version = "1.1.0"
11+
Version = "1.1.1"
1212
)
1313

1414
func main() {
@@ -23,7 +23,16 @@ func main() {
2323
"Ben Boyter <[email protected]>" +
2424
"\n\n" +
2525
"cs recursively searches the current directory using some boolean logic\n" +
26-
"optionally combined with regular expressions." +
26+
"optionally combined with regular expressions.\n" +
27+
"\n" +
28+
"searches by default use AND boolean syntax for all terms\n" +
29+
" - exact match using quotes \"find this\"\n" +
30+
" - fuzzy match within 1 or 2 distance fuzzy~1 fuzzy~2\n" +
31+
" - negate using NOT such as pride NOT prejudice\n" +
32+
" - regex with toothpick syntax /pr[e-i]de/\n" +
33+
"\n" +
34+
"example search that uses all current functionality\n" +
35+
" - darcy NOT collins wickham~1 \"ten thousand a year\" \"/pr[e-i]de/\"\n" +
2736
"\n",
2837
Version: Version,
2938
Run: func(cmd *cobra.Command, args []string) {

0 commit comments

Comments
 (0)