From f26146d827b0add6307602ff53d1e3cb8d213e59 Mon Sep 17 00:00:00 2001 From: gwirn <71886945+gwirn@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:55:06 +0100 Subject: [PATCH] reordered and updated description --- README.md | 16 +++++++++++----- src/main.go | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4da4f71..9d449cd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,9 @@ 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 @@ -42,11 +44,15 @@ The search can also be performed reading from StdIn with e.g. `cat [FILE | STDIN -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") ``` diff --git a/src/main.go b/src/main.go index 9e733d9..9acb961 100644 --- a/src/main.go +++ b/src/main.go @@ -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 @@ -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")