mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 01:27:21 +01: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
|
||||
if config.YayConf.SearchMode == config.NumberMenu {
|
||||
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 {
|
||||
toprint += fmt.Sprintf("%d ", i)
|
||||
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", i)
|
||||
}
|
||||
} else if config.YayConf.SearchMode == config.Minimal {
|
||||
fmt.Println(res.Name())
|
||||
@ -93,7 +93,7 @@ func (s Query) PrintSearch() {
|
||||
}
|
||||
}
|
||||
|
||||
toprint += "\n" + res.Description()
|
||||
toprint += "\n " + res.Description()
|
||||
fmt.Println(toprint)
|
||||
}
|
||||
}
|
||||
|
6
query.go
6
query.go
@ -17,9 +17,9 @@ func printAURSearch(q aur.Query, start int) {
|
||||
var toprint string
|
||||
if config.YayConf.SearchMode == config.NumberMenu {
|
||||
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 {
|
||||
toprint += fmt.Sprintf("%d ", start+i)
|
||||
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", start+i)
|
||||
}
|
||||
} else if config.YayConf.SearchMode == config.Minimal {
|
||||
fmt.Println(res.Name)
|
||||
@ -37,7 +37,7 @@ func printAURSearch(q aur.Query, start int) {
|
||||
if _, err := localDb.PkgByName(res.Name); err == nil {
|
||||
toprint += fmt.Sprintf("\x1b[32;40mInstalled\x1b[0m")
|
||||
}
|
||||
toprint += "\n" + res.Description
|
||||
toprint += "\n " + res.Description
|
||||
fmt.Println(toprint)
|
||||
}
|
||||
|
||||
|
2
yay.go
2
yay.go
@ -184,7 +184,7 @@ func numberMenu(pkgS []string, flags []string) (err error) {
|
||||
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)
|
||||
numberBuf, overflow, err := reader.ReadLine()
|
||||
if err != nil || overflow {
|
||||
|
Loading…
Reference in New Issue
Block a user