Add an option to move header on borders (#9796)

A patch to play with.
Need to make a few tests after all.

The question is what shall be done with `table.mode = none`, as it has
no borders.

```nu
$env.config.table.move_header = true
```


![image](https://github.com/nushell/nushell/assets/20165848/cdcffa6d-989c-4368-a436-fdf7d3400e31)

cc: @fdncred

---------

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
This commit is contained in:
Maxim Zhiburt
2023-08-03 22:03:20 +03:00
committed by GitHub
parent 14bf25da14
commit 7162289d77
20 changed files with 758 additions and 743 deletions

View File

@ -42,3 +42,8 @@ pub fn string_truncate(text: &str, width: usize) -> String {
Truncate::truncate_text(line, width).into_owned()
}
pub fn clean_charset(text: &str) -> String {
// todo: optimize, I bet it can be done in 1 path
text.replace('\t', " ").replace('\r', "")
}