Copyright (c) 2009-2011 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
import static org.fusesource.jansi.Ansi.Attribute.INTENSITY_BOLD;
import static org.fusesource.jansi.Ansi.Color.GREEN;
import static org.fusesource.jansi.Ansi.ansi;
import static org.sonatype.gshell.commands.standard.InfoCommand.Section.SHELL;
Display shell information.
- Jason Dillon
@Option(name = "a", longName = "all")
println(io, "ANSI", Ansi.isEnabled());
println(io, "Garbage collector", val);
return FMTI.format((long) (size / 1024)) + " kbytes";
long minutes = (long) uptime;
long hours = (long) uptime;
long minutes = (long) ((uptime - hours) * 60);
s += " " + FMTI.format(minutes) + (minutes > 1 ? " minutes" : "minute");
long days = (long) uptime;
long hours = (long) ((uptime - days) * 60);
s += " " + FMTI.format(hours) + (hours > 1 ? " hours" : "hour");
io.println(ansi().a(" ").a(INTENSITY_BOLD).a(name).reset().a(": ").a(value));