v0.2.10 : affichage ls/dir adapte a la largeur du terminal — detection de la largeur de la console (AM_TABLE_WIDTH pour tests), troncature de la colonne nom avec …, suppression des colonnes de fin si necessaire, une ligne par entree
This commit is contained in:
+3
-2
@@ -163,9 +163,10 @@ pub fn ls_table(path: &Path, color: bool) -> Result<DataTable> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Render a Nushell-style boxed table of the entries of a path.
|
||||
/// Render a Nushell-style boxed table of the entries of a path (unbounded
|
||||
/// width — used by tests; the REPL renders with the terminal width).
|
||||
pub fn render_ls(path: &Path, color: bool) -> Result<String> {
|
||||
Ok(ls_table(path, color)?.render(color))
|
||||
Ok(ls_table(path, color)?.render(color, 200))
|
||||
}
|
||||
|
||||
/// Completion candidates for a path fragment typed after cd or ls.
|
||||
|
||||
Reference in New Issue
Block a user