mirror of
https://github.com/nushell/nushell.git
synced 2024-11-28 19:33:47 +01:00
Change black to other colors (#1194)
This commit is contained in:
parent
147bfefd7e
commit
63885c4ee6
@ -449,8 +449,8 @@ impl ShellError {
|
|||||||
format!(
|
format!(
|
||||||
"{} requires {}{}",
|
"{} requires {}{}",
|
||||||
Color::Cyan.paint(&command.item),
|
Color::Cyan.paint(&command.item),
|
||||||
Color::Black.bold().paint("--"),
|
Color::Green.bold().paint("--"),
|
||||||
Color::Black.bold().paint(name)
|
Color::Green.bold().paint(name)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.with_label(Label::new_primary(command.span)),
|
.with_label(Label::new_primary(command.span)),
|
||||||
@ -470,8 +470,8 @@ impl ShellError {
|
|||||||
format!(
|
format!(
|
||||||
"{} is missing value for flag {}{}",
|
"{} is missing value for flag {}{}",
|
||||||
Color::Cyan.paint(&command.item),
|
Color::Cyan.paint(&command.item),
|
||||||
Color::Black.bold().paint("--"),
|
Color::Green.bold().paint("--"),
|
||||||
Color::Black.bold().paint(name)
|
Color::Green.bold().paint(name)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.with_label(Label::new_primary(command.span)),
|
.with_label(Label::new_primary(command.span)),
|
||||||
|
@ -29,7 +29,7 @@ impl From<ShellAnnotation> for ColorSpec {
|
|||||||
.set_intense(false)
|
.set_intense(false)
|
||||||
.clone(),
|
.clone(),
|
||||||
ShellStyle::Key => ColorSpec::new()
|
ShellStyle::Key => ColorSpec::new()
|
||||||
.set_fg(Some(Color::Black))
|
.set_fg(Some(Color::Green))
|
||||||
.set_intense(true)
|
.set_intense(true)
|
||||||
.clone(),
|
.clone(),
|
||||||
ShellStyle::Value => ColorSpec::new()
|
ShellStyle::Value => ColorSpec::new()
|
||||||
@ -37,7 +37,7 @@ impl From<ShellAnnotation> for ColorSpec {
|
|||||||
.set_intense(true)
|
.set_intense(true)
|
||||||
.clone(),
|
.clone(),
|
||||||
ShellStyle::Equals => ColorSpec::new()
|
ShellStyle::Equals => ColorSpec::new()
|
||||||
.set_fg(Some(Color::Black))
|
.set_fg(Some(Color::Green))
|
||||||
.set_intense(true)
|
.set_intense(true)
|
||||||
.clone(),
|
.clone(),
|
||||||
ShellStyle::Kind => ColorSpec::new().set_fg(Some(Color::Cyan)).clone(),
|
ShellStyle::Kind => ColorSpec::new().set_fg(Some(Color::Cyan)).clone(),
|
||||||
@ -56,7 +56,7 @@ impl From<ShellAnnotation> for ColorSpec {
|
|||||||
.set_intense(true)
|
.set_intense(true)
|
||||||
.clone(),
|
.clone(),
|
||||||
ShellStyle::Description => ColorSpec::new()
|
ShellStyle::Description => ColorSpec::new()
|
||||||
.set_fg(Some(Color::Black))
|
.set_fg(Some(Color::Green))
|
||||||
.set_intense(true)
|
.set_intense(true)
|
||||||
.clone(),
|
.clone(),
|
||||||
ShellStyle::Error => ColorSpec::new()
|
ShellStyle::Error => ColorSpec::new()
|
||||||
|
@ -139,8 +139,8 @@ fn values_to_entries(values: &[Value], headers: &mut Vec<String>, starting_idx:
|
|||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
if values_len > 1 {
|
if values_len > 1 {
|
||||||
// Indices are black, bold, right-aligned:
|
// Indices are green, bold, right-aligned:
|
||||||
row.insert(0, ((starting_idx + idx).to_string(), "Fdbr"));
|
row.insert(0, ((starting_idx + idx).to_string(), "Fgbr"));
|
||||||
}
|
}
|
||||||
|
|
||||||
entries.push(row);
|
entries.push(row);
|
||||||
|
@ -150,7 +150,7 @@ fn paint_flat_shape(flat_shape: &Spanned<FlatShape>, line: &str) -> String {
|
|||||||
FlatShape::Dot => Color::White.normal(),
|
FlatShape::Dot => Color::White.normal(),
|
||||||
FlatShape::InternalCommand => Color::Cyan.bold(),
|
FlatShape::InternalCommand => Color::Cyan.bold(),
|
||||||
FlatShape::ExternalCommand => Color::Cyan.normal(),
|
FlatShape::ExternalCommand => Color::Cyan.normal(),
|
||||||
FlatShape::ExternalWord => Color::Black.bold(),
|
FlatShape::ExternalWord => Color::Green.bold(),
|
||||||
FlatShape::BareMember => Color::Yellow.bold(),
|
FlatShape::BareMember => Color::Yellow.bold(),
|
||||||
FlatShape::StringMember => Color::Yellow.bold(),
|
FlatShape::StringMember => Color::Yellow.bold(),
|
||||||
FlatShape::String => Color::Green.normal(),
|
FlatShape::String => Color::Green.normal(),
|
||||||
@ -158,12 +158,12 @@ fn paint_flat_shape(flat_shape: &Spanned<FlatShape>, line: &str) -> String {
|
|||||||
FlatShape::GlobPattern => Color::Cyan.bold(),
|
FlatShape::GlobPattern => Color::Cyan.bold(),
|
||||||
FlatShape::Word => Color::Green.normal(),
|
FlatShape::Word => Color::Green.normal(),
|
||||||
FlatShape::Pipe => Color::Purple.bold(),
|
FlatShape::Pipe => Color::Purple.bold(),
|
||||||
FlatShape::Flag => Color::Black.bold(),
|
FlatShape::Flag => Color::Blue.bold(),
|
||||||
FlatShape::ShorthandFlag => Color::Black.bold(),
|
FlatShape::ShorthandFlag => Color::Blue.bold(),
|
||||||
FlatShape::Int => Color::Purple.bold(),
|
FlatShape::Int => Color::Purple.bold(),
|
||||||
FlatShape::Decimal => Color::Purple.bold(),
|
FlatShape::Decimal => Color::Purple.bold(),
|
||||||
FlatShape::Whitespace | FlatShape::Separator => Color::White.normal(),
|
FlatShape::Whitespace | FlatShape::Separator => Color::White.normal(),
|
||||||
FlatShape::Comment => Color::Black.bold(),
|
FlatShape::Comment => Color::Green.bold(),
|
||||||
FlatShape::Error => Color::Red.bold(),
|
FlatShape::Error => Color::Red.bold(),
|
||||||
FlatShape::Size { number, unit } => {
|
FlatShape::Size { number, unit } => {
|
||||||
let number = number.slice(line);
|
let number = number.slice(line);
|
||||||
|
Loading…
Reference in New Issue
Block a user