mirror of
https://github.com/Jguer/yay
synced 2024-09-14 13:51:12 +00:00
Merge branch 'maximbaz-improve-query-list-formatting' into dev
This commit is contained in:
commit
22f8dcf150
|
@ -71,9 +71,9 @@ func (s Query) PrintSearch() {
|
||||||
var toprint string
|
var toprint string
|
||||||
if config.YayConf.SearchMode == config.NumberMenu {
|
if config.YayConf.SearchMode == config.NumberMenu {
|
||||||
if config.YayConf.SortMode == config.BottomUp {
|
if config.YayConf.SortMode == config.BottomUp {
|
||||||
toprint += fmt.Sprintf("%d ", len(s)-i-1)
|
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", len(s)-i-1)
|
||||||
} else {
|
} else {
|
||||||
toprint += fmt.Sprintf("%d ", i)
|
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", i)
|
||||||
}
|
}
|
||||||
} else if config.YayConf.SearchMode == config.Minimal {
|
} else if config.YayConf.SearchMode == config.Minimal {
|
||||||
fmt.Println(res.Name())
|
fmt.Println(res.Name())
|
||||||
|
@ -93,7 +93,7 @@ func (s Query) PrintSearch() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toprint += "\n" + res.Description()
|
toprint += "\n " + res.Description()
|
||||||
fmt.Println(toprint)
|
fmt.Println(toprint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
6
query.go
6
query.go
|
@ -17,9 +17,9 @@ func printAURSearch(q aur.Query, start int) {
|
||||||
var toprint string
|
var toprint string
|
||||||
if config.YayConf.SearchMode == config.NumberMenu {
|
if config.YayConf.SearchMode == config.NumberMenu {
|
||||||
if config.YayConf.SortMode == config.BottomUp {
|
if config.YayConf.SortMode == config.BottomUp {
|
||||||
toprint += fmt.Sprintf("%d ", len(q)+start-i-1)
|
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", len(q)+start-i-1)
|
||||||
} else {
|
} else {
|
||||||
toprint += fmt.Sprintf("%d ", start+i)
|
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", start+i)
|
||||||
}
|
}
|
||||||
} else if config.YayConf.SearchMode == config.Minimal {
|
} else if config.YayConf.SearchMode == config.Minimal {
|
||||||
fmt.Println(res.Name)
|
fmt.Println(res.Name)
|
||||||
|
@ -37,7 +37,7 @@ func printAURSearch(q aur.Query, start int) {
|
||||||
if _, err := localDb.PkgByName(res.Name); err == nil {
|
if _, err := localDb.PkgByName(res.Name); err == nil {
|
||||||
toprint += fmt.Sprintf("\x1b[32;40mInstalled\x1b[0m")
|
toprint += fmt.Sprintf("\x1b[32;40mInstalled\x1b[0m")
|
||||||
}
|
}
|
||||||
toprint += "\n" + res.Description
|
toprint += "\n " + res.Description
|
||||||
fmt.Println(toprint)
|
fmt.Println(toprint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
yay.go
2
yay.go
|
@ -184,7 +184,7 @@ func numberMenu(pkgS []string, flags []string) (err error) {
|
||||||
printAURSearch(aq, numpq)
|
printAURSearch(aq, numpq)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("\x1b[32m%s\x1b[0m\nNumbers:", "Type numbers to install. Separate each number with a space.")
|
fmt.Printf("\x1b[32m%s\x1b[0m\nNumbers: ", "Type numbers to install. Separate each number with a space.")
|
||||||
reader := bufio.NewReader(os.Stdin)
|
reader := bufio.NewReader(os.Stdin)
|
||||||
numberBuf, overflow, err := reader.ReadLine()
|
numberBuf, overflow, err := reader.ReadLine()
|
||||||
if err != nil || overflow {
|
if err != nil || overflow {
|
||||||
|
|
Loading…
Reference in a new issue