Skip to content

Commit

Permalink
Added version, updated README with features
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowy-pycoder committed Nov 30, 2024
1 parent 31dfb1c commit 767fb14
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/shadowy-pycoder/goso/total)


## Features

- Syntax highlighting
- Fast search
- Easy to use
- Support for Linux, Windows, macOS


## Demo

![goso - Animated gif demo](demo/demo.gif)
Expand Down Expand Up @@ -94,13 +102,14 @@ Usage: goso [OPTIONS] QUERY
Options:
-h Show this help message and exit.
-a int
The maximum number of answers for each result [min=1, max=10] (default 1)
The number of answers for each result [min=1, max=10] (default 3)
-l string
The name of Chroma lexer. See https://github.com/alecthomas/chroma/tree/master/lexers/embedded (default "bash")
-q int
The number of results [min=1, max=10] (default 1)
The number of questions [min=1, max=10] (default 10)
-s string
The name of Chroma style. See https://xyproto.github.io/splash/docs/ (default "onedark")
-v print version
```
It is possible to adjust default values for the number of questions and answers, lexer and style.
Expand Down
5 changes: 5 additions & 0 deletions cmd/goso/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ func root(args []string) error {
flags.StringVar(&conf.Style, "s", style, "The name of Chroma style. See https://xyproto.github.io/splash/docs/")
qNum := flags.Int("q", qn, "The number of questions [min=1, max=10]")
aNum := flags.Int("a", an, "The number of answers for each result [min=1, max=10]")
flags.BoolFunc("v", "print version", func(flagValue string) error {
fmt.Println(app, goso.Version)
os.Exit(0)
return nil
})

flags.Usage = func() {
fmt.Print(usagePrefix)
Expand Down
3 changes: 3 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package goso

var Version string = "v0.0.3"

0 comments on commit 767fb14

Please sign in to comment.