refactor: Enhance table generation and clean up dependencies
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::config;
|
||||
use crate::services::item_service::ItemService;
|
||||
use crate::services::types::ItemWithMeta;
|
||||
use crate::modes::common::ColumnType;
|
||||
use crate::modes::common::{size_column, string_column, OutputFormat};
|
||||
use crate::modes::common::{format_size, OutputFormat};
|
||||
use anyhow::{Result};
|
||||
use log::debug;
|
||||
use comfy_table::{Table, ContentArrangement, Cell, Row, Color, Attribute};
|
||||
@@ -55,11 +55,8 @@ pub fn mode_list(
|
||||
let mut table = Table::new();
|
||||
table
|
||||
.load_preset(NOTHING)
|
||||
.set_content_arrangement(ContentArrangement::Dynamic);
|
||||
|
||||
if !stdout().is_terminal() {
|
||||
table.force_no_tty();
|
||||
}
|
||||
.set_content_arrangement(ContentArrangement::Dynamic)
|
||||
.force_no_tty_if(!stdout().is_terminal());
|
||||
|
||||
// Create header row
|
||||
let mut header_cells = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user