1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-09 19:07:16 +02:00

Correct spelling ()

This commit is contained in:
Edward Betts
2021-11-25 17:11:20 +00:00
committed by GitHub
parent e06df124ca
commit 3e93ae8af4
11 changed files with 11 additions and 11 deletions
crates
README.md
nu-command
src
commands
platform
strings
str_
nu-engine
nu-parser
nu-path
nu-protocol
src
docs

@ -10,4 +10,4 @@ Foundational libraries are split into two kinds of crates:
Plugins are likewise also split into two types: Plugins are likewise also split into two types:
* Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features. * Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
* Extra plugins - these plugins run a wide range of differnt capabilities like working with different file types, charting, viewing binary data, and more. * Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.

@ -170,7 +170,7 @@ fn action(
Ok(UntaggedValue::string(gradient_string).into_value(tag)) Ok(UntaggedValue::string(gradient_string).into_value(tag))
} }
(None, Some(fg_end), None, Some(bg_end)) => { (None, Some(fg_end), None, Some(bg_end)) => {
// missin fg_start and bg_start, so assume black // missing fg_start and bg_start, so assume black
let fg_start = Rgb::new(0, 0, 0); let fg_start = Rgb::new(0, 0, 0);
let bg_start = Rgb::new(0, 0, 0); let bg_start = Rgb::new(0, 0, 0);
let fg_gradient = Gradient::new(fg_start, fg_end); let fg_gradient = Gradient::new(fg_start, fg_end);

@ -144,7 +144,7 @@ fn trim(s: &str, char_: Option<char>, closure_flags: &ClosureFlags) -> String {
let re_str = format!("{}{{2,}}", reg); let re_str = format!("{}{{2,}}", reg);
// create the regex // create the regex
let re = regex::Regex::new(&re_str).expect("Error creating regular expression"); let re = regex::Regex::new(&re_str).expect("Error creating regular expression");
// replace all mutliple occurances with single occurences represented by r // replace all multiple occurrences with single occurrences represented by r
let new_str = re.replace_all(&return_string, r.to_string()); let new_str = re.replace_all(&return_string, r.to_string());
// update the return string so the next loop has the latest changes // update the return string so the next loop has the latest changes
return_string = new_str.to_string(); return_string = new_str.to_string();

@ -60,7 +60,7 @@ pub fn nu(scope: &Scope, ctx: &EvaluationContext) -> Result<Value, ShellError> {
// std::env::vars(), rather than the case-sensitive Environment.GetEnvironmentVariables() of .NET that PowerShell // std::env::vars(), rather than the case-sensitive Environment.GetEnvironmentVariables() of .NET that PowerShell
// uses. // uses.
// //
// For now, we work around the discrepency as best we can by merging the two into what is shown to the user as the // For now, we work around the discrepancy as best we can by merging the two into what is shown to the user as the
// 'path' column of `$nu` // 'path' column of `$nu`
let mut table = vec![]; let mut table = vec![];
for v in env { for v in env {

@ -238,7 +238,7 @@ impl Default for Theme {
variable: ThemeColor(Color::Purple), variable: ThemeColor(Color::Purple),
whitespace: ThemeColor(Color::White), whitespace: ThemeColor(Color::White),
word: ThemeColor(Color::Green), word: ThemeColor(Color::Green),
// These should really be Syles and not colors // These should really be Styles and not colors
// leave this here for the next change to make // leave this here for the next change to make
// ThemeColor, ThemeStyle. // ThemeColor, ThemeStyle.
// open_delimiter: ThemeColor(Color::White.normal()), // open_delimiter: ThemeColor(Color::White.normal()),

@ -597,7 +597,7 @@ impl VarSyntaxShapeDeductor {
} }
Expression::Table(header, _rows) => { Expression::Table(header, _rows) => {
self.infer_shapes_in_table_header(header)?; self.infer_shapes_in_table_header(header)?;
// Shapes within columns can be heterogenous as long as // Shapes within columns can be heterogeneous as long as
// https://github.com/nushell/rfcs/pull/3 // https://github.com/nushell/rfcs/pull/3
// didn't land // didn't land
// self.infer_shapes_in_rows(_rows)?; // self.infer_shapes_in_rows(_rows)?;

@ -132,7 +132,7 @@ mod tests {
match spec { match spec {
NamedType::Optional(_, _) => {} NamedType::Optional(_, _) => {}
_ => panic!("optional flag didn't parse succesfully"), _ => panic!("optional flag didn't parse successfully"),
} }
} }
} }

@ -901,7 +901,7 @@ fn parse_arg(
return parse_dollar_expr(lite_arg, scope); return parse_dollar_expr(lite_arg, scope);
} }
// before anything else, try to see if this is a number in paranthesis // before anything else, try to see if this is a number in parenthesis
if lite_arg.item.starts_with('(') { if lite_arg.item.starts_with('(') {
return parse_full_column_path(lite_arg, scope); return parse_full_column_path(lite_arg, scope);
} }

@ -19,7 +19,7 @@ fn handle_dots_push(string: &mut String, count: u8) {
string.pop(); // remove last '/' string.pop(); // remove last '/'
} }
/// Expands any occurence of more than two dots into a sequence of ../ (or ..\ on windows), e.g., /// Expands any occurrence of more than two dots into a sequence of ../ (or ..\ on windows), e.g.,
/// "..." into "../..", "...." into "../../../", etc. /// "..." into "../..", "...." into "../../../", etc.
pub fn expand_ndots(path: impl AsRef<Path>) -> PathBuf { pub fn expand_ndots(path: impl AsRef<Path>) -> PathBuf {
// Check if path is valid UTF-8 and if not, return it as it is to avoid breaking it via string // Check if path is valid UTF-8 and if not, return it as it is to avoid breaking it via string

@ -290,7 +290,7 @@ impl Primitive {
.expect("Internal error: conversion from u32 failed"), .expect("Internal error: conversion from u32 failed"),
); );
let secs = match secs.to_i64() { let secs = match secs.to_i64() {
//The duration crate doesnt accept seconds bigger than i64::MAX / 1000 //The duration crate doesn't accept seconds bigger than i64::MAX / 1000
Some(secs) => match secs.checked_mul(1000) { Some(secs) => match secs.checked_mul(1000) {
Some(_) => secs, Some(_) => secs,
None => { None => {

@ -2,7 +2,7 @@
You may find it desirable to compile nu shell without requiring an OpenSSL installation on your system. You may find it desirable to compile nu shell without requiring an OpenSSL installation on your system.
You can do this by runnning: You can do this by running:
```sh ```sh
cargo build --no-default-features --features=rustyline-support cargo build --no-default-features --features=rustyline-support
``` ```