Display fields with more than 1 value (p.e ip4_addr), line separator between jails
This commit is contained in:
@ -20,6 +20,7 @@ var (
|
||||
|
||||
gConfigFile string
|
||||
gDisplayColumns string
|
||||
gNoLineSep bool
|
||||
|
||||
|
||||
rootCmd = & cobra.Command{
|
||||
@ -76,6 +77,7 @@ func init() {
|
||||
|
||||
// Command dependant switches
|
||||
listCmd.PersistentFlags().StringVarP(&gDisplayColumns, "outcol", "o", "JID,Name,Config.Release,Config.Ip4_addr,Running", "Show these columns in output")
|
||||
listCmd.PersistentFlags().BoolVarP(&gNoLineSep, "nolinesep", "l", false, "Do not display line separator between jails")
|
||||
/* searchComputerCmd.PersistentFlags().BoolVarP(&gShowAccount, "show-account", "c", false, "Show account when listing computer")
|
||||
searchComputerCmd.PersistentFlags().BoolVarP(&gDisplayAsCSV, "csv-format", "v", false, "Show results in CSV (separator = ';')")
|
||||
*/
|
||||
@ -112,6 +114,9 @@ func initConfig() {
|
||||
if false == listCmd.Flags().Lookup("outcol").Changed {
|
||||
gDisplayColumns = viper.GetString("outcol")
|
||||
}
|
||||
if false == listCmd.Flags().Lookup("nolinesep").Changed {
|
||||
gNoLineSep = viper.GetBool("nolinesep")
|
||||
}
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
|
||||
Reference in New Issue
Block a user