diff --git a/module/core/format_tools/src/format/output_format/table.rs b/module/core/format_tools/src/format/output_format/table.rs index 579ba6c783..e96af36f20 100644 --- a/module/core/format_tools/src/format/output_format/table.rs +++ b/module/core/format_tools/src/format/output_format/table.rs @@ -247,9 +247,20 @@ impl TableOutputFormat for Table write!( c.buf, "{}", cell_prefix )?; - // println!( "icol : {icol} | irow : {irow} | width : {width} | cell_width : {cell_width}" ); - let lspaces = ( width - cell_width ) / 2; - let rspaces = ( width - cell_width + 1 ) / 2 + cell_width - slice.len(); + println!( "icol : {icol} | irow : {irow} | width : {width} | cell_width : {cell_width} | slice.len() : {}", slice.len() ); + + let lspaces = if cell_width > width { + 0 + } else { + ( width - cell_width ) / 2 + }; + + let rspaces = if (cell_width > width) || (slice.len() > cell_width) { + 0 + } else { + ( width - cell_width + 1 ) / 2 + cell_width - slice.len() + }; + // println!( "icol : {icol} | irow : {irow} | width : {width} | cell_width : {cell_width} | lspaces : {lspaces} | rspaces : {rspaces}" ); if lspaces > 0 diff --git a/module/move/assistant/src/bin/main.rs b/module/move/assistant/src/bin/main.rs index 69843c1ed4..419030d03b 100644 --- a/module/move/assistant/src/bin/main.rs +++ b/module/move/assistant/src/bin/main.rs @@ -14,7 +14,7 @@ use clap::Parser; use assistant:: { - client, + client::client, commands::{ Cli, CliCommand, self }, Secret };