Skip to content

Commit

Permalink
reordered and updated description
Browse files Browse the repository at this point in the history
  • Loading branch information
gwirn committed Mar 20, 2024
1 parent 78e2bc2 commit f26146d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,25 @@ The search can also be performed reading from StdIn with e.g. `cat [FILE | STDIN
### Possible optional argument

```go
SYNOPSIS /home/gwirn/.golaf/golaf/src/golaf [-gapp] [-mmp] [-match] [-quality] [-color] [pattern] [file ...]
SYNOPSIS golaf [-bin] [-color] [-gapp] [-match] [-mmp] [-quality] [-recH] [-recursive] [-type] [pattern] [file ...]
-bin
include binary files in the search
-color string
color option for highlighting the found results- options: [ red green yellow blue purple cyan white ] (default "green")
-gapp int
gap penalty [NEGATIVE] (default -2)
-match int
score for a match [POSITIVE] (default 3)
-mmp int
missmatch penalty [NEGATIVE] (default -3)
mismatch penalty [NEGATIVE] (default -3)
-quality int
percentage of the pattern that have to macht to be seen as match (default 75)
percentage of the pattern that have to match to be seen as match (default 75)
-recH
include hidden files in search
include hidden files in the search
-recursive string
root directorx for recursively searching through all files (default ".")
root directory for recursively searching through all files (default ".")
-type string
Search type
c - search in file content
n - search for files and directories (default "c")
```
4 changes: 2 additions & 2 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Parse command line arguments and execute search over files or stdin
*/
func argparse() {
flag.Usage = func() {
fmt.Printf("SYNOPSIS %s [-gapp] [-mmp] [-match] [-quality] [-color] [-recursive] [-recH] [-type] [pattern] [file ...]\n", os.Args[0])
fmt.Printf("SYNOPSIS %s [-bin] [-color] [-gapp] [-match] [-mmp] [-quality] [-recH] [-recursive] [-type] [pattern] [file ...]\n", os.Args[0])
flag.PrintDefaults()
}
// optional arguments
Expand All @@ -263,7 +263,7 @@ func argparse() {
// to include hidden files in search
recursiveHiddenPtr := flag.Bool("recH", false, "include hidden files in the search")
// to include binary files in search
addBinarySearchPtr := flag.Bool("binary", false, "include binary files in the search")
addBinarySearchPtr := flag.Bool("bin", false, "include binary files in the search")
// which search should be performed
searchTypePtr := flag.String("type", "c", "Search type\nc - search in file content\nn - search for files and directories")

Expand Down

0 comments on commit f26146d

Please sign in to comment.