From e86e39a21d4a5d33489cbba93a34b2fe7f0ed30f Mon Sep 17 00:00:00 2001 From: Jguer Date: Mon, 12 Mar 2018 21:01:53 +0000 Subject: [PATCH] Add left padding to number menu Signed-off-by: Jguer --- install.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install.go b/install.go index d9ca3eb4..a2a18b65 100644 --- a/install.go +++ b/install.go @@ -261,7 +261,8 @@ func cleanEditNumberMenu(pkgs []*rpc.Pkg, bases map[string][]*rpc.Pkg, installed for n, pkg := range pkgs { dir := config.BuildDir + pkg.PackageBase + "/" - toPrint += magenta(strconv.Itoa(len(pkgs)-n)) + " " + bold(formatPkgbase(pkg, bases)) + toPrint += fmt.Sprintf("%s %-40s", magenta(strconv.Itoa(len(pkgs)-n)), + bold(formatPkgbase(pkg, bases))) if installed.get(pkg.Name) { toPrint += bold(green(" (Installed)")) } @@ -277,7 +278,7 @@ func cleanEditNumberMenu(pkgs []*rpc.Pkg, bases map[string][]*rpc.Pkg, installed fmt.Print(toPrint) if askClean { - fmt.Println(bold(green(arrow+" Packages to cleanBuild?"))) + fmt.Println(bold(green(arrow + " Packages to cleanBuild?"))) fmt.Println(bold(green(arrow) + cyan(" [N]one ") + green("[A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)"))) fmt.Print(bold(green(arrow + " "))) reader := bufio.NewReader(os.Stdin) @@ -337,8 +338,8 @@ func cleanEditNumberMenu(pkgs []*rpc.Pkg, bases map[string][]*rpc.Pkg, installed } } - fmt.Println(bold(green(arrow+" PKGBUILDs to edit?"))) - fmt.Println(bold(green(arrow) +cyan(" [N]one ") + green("[A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)"))) + fmt.Println(bold(green(arrow + " PKGBUILDs to edit?"))) + fmt.Println(bold(green(arrow) + cyan(" [N]one ") + green("[A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)"))) fmt.Print(bold(green(arrow + " "))) reader := bufio.NewReader(os.Stdin)