mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Fixes #20
This commit is contained in:
parent
a91984045c
commit
c1eb116c53
2 changed files with 7 additions and 4 deletions
|
@ -23,6 +23,9 @@ func NarrowSearch(pkgS []string, sortS bool) (Query, error) {
|
|||
}
|
||||
|
||||
r, err := rpc.Search(pkgS[0])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(pkgS) == 1 {
|
||||
if sortS {
|
||||
|
@ -32,7 +35,7 @@ func NarrowSearch(pkgS []string, sortS bool) (Query, error) {
|
|||
}
|
||||
|
||||
var aq Query
|
||||
var n int = 0
|
||||
var n int
|
||||
|
||||
for _, res := range r {
|
||||
match := true
|
||||
|
|
|
@ -67,13 +67,13 @@ func ContinueTask(s string, def string) (cont bool) {
|
|||
var postFix string
|
||||
|
||||
if def == "nN" {
|
||||
postFix = "(Y/n)"
|
||||
postFix = "[Y/n] "
|
||||
} else {
|
||||
postFix = "(y/N)"
|
||||
postFix = "[y/N] "
|
||||
}
|
||||
|
||||
var response string
|
||||
fmt.Printf("\x1b[1;32m==> %s\x1b[1;37m %s\x1b[0m\n", s, postFix)
|
||||
fmt.Printf("\x1b[1;32m==> %s\x1b[1;37m %s\x1b[0m", s, postFix)
|
||||
|
||||
fmt.Scanln(&response)
|
||||
if response == string(def[0]) || response == string(def[1]) {
|
||||
|
|
Loading…
Reference in a new issue