mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
Color info for config.toml (#2478)
* WIP - compiling but not working * semi-working * making progress * working except for table lines * fmt + clippy * cleaned up some comments * working line colors * fmt, clippy, updated sample config.toml * merges * some info on how to set colors
This commit is contained in:
parent
adbbcafd30
commit
569345e1d4
@ -652,6 +652,7 @@ impl WrappedTable {
|
||||
}
|
||||
|
||||
println!("{}", output);
|
||||
// println!("{:#?}", output);
|
||||
}
|
||||
|
||||
fn print_cell_contents(&self, cells: &[WrappedCell], color_hm: &HashMap<String, Style>) {
|
||||
@ -677,6 +678,7 @@ impl WrappedTable {
|
||||
let remainder = self.column_widths[column.0] - line.width;
|
||||
output.push(' ');
|
||||
|
||||
// println!("Column1: [{:?}]", column.1.style);
|
||||
match column.1.style.alignment {
|
||||
Alignment::Left => {
|
||||
if let Some(color) = column.1.style.color_style {
|
||||
|
@ -14,6 +14,26 @@ complete_from_path = true
|
||||
rm_always_trash = true
|
||||
prompt = "echo [ $(ansi gb) $(pwd) $(ansi reset) \"(\" $(ansi cb) $(do -i { git rev-parse --abbrev-ref HEAD | trim }) $(ansi reset) \")\" $(char newline) $(ansi yb) $(date --format \"%m/%d/%Y %I:%M:%S%.3f %p\" --raw) $(ansi reset) \"> \" ] | str collect"
|
||||
|
||||
# for each of the options in the color_config section, you are able to set
|
||||
# the color alone or with one of the following attributes.
|
||||
# color, abbreviation
|
||||
# green g
|
||||
# red r
|
||||
# blue u
|
||||
# black b
|
||||
# yellow y
|
||||
# purple p
|
||||
# cyan c
|
||||
# white w
|
||||
# attribute, abbreviation
|
||||
# bold b
|
||||
# underline u
|
||||
# italic i
|
||||
# dimmed d
|
||||
# reverse r
|
||||
# abbreviated: green bold = gb, red underline = ru, blue dimmed = ud
|
||||
# or verbose: green_bold, red_underline, blue_dimmed
|
||||
|
||||
[color_config]
|
||||
primitive_int = "green"
|
||||
primitive_decimal = "red"
|
||||
@ -32,7 +52,6 @@ separator_color = "purple"
|
||||
header_align = "l" # left|l, right|r, center|c
|
||||
header_color = "c" # green|g, red|r, blue|u, black|b, yellow|y, purple|p, cyan|c, white|w
|
||||
header_bold = true
|
||||
header_style = "cb"
|
||||
index_color = "rd"
|
||||
|
||||
[line_editor]
|
||||
|
Loading…
Reference in New Issue
Block a user