mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Fix typos (#2842)
This commit is contained in:
@ -122,7 +122,7 @@ async fn benchmark(raw_args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||
benchmark_output(indexmap, output, passthrough, &tag, &mut context).await
|
||||
} else {
|
||||
Err(ShellError::untagged_runtime_error(
|
||||
"Could not retreive CPU time",
|
||||
"Could not retrieve CPU time",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ async fn process_row(
|
||||
match replace_for {
|
||||
Ok(s) => match convert_bytes_to_string_using_format(s, format) {
|
||||
Ok(b) => OutputStream::one(ReturnSuccess::value(
|
||||
input.replace_data_at_column_path(&field, b).expect("Given that the existance check was already done, this souldn't trigger never"),
|
||||
input.replace_data_at_column_path(&field, b).expect("Given that the existence check was already done, this shouldn't trigger never"),
|
||||
)),
|
||||
Err(e) => OutputStream::one(Err(e)),
|
||||
},
|
||||
|
@ -90,7 +90,7 @@ pub async fn histogram(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||
} else if let Some((key, _)) = columns[0].split_last() {
|
||||
key.as_string()
|
||||
} else {
|
||||
"frecuency".to_string()
|
||||
"frequency".to_string()
|
||||
};
|
||||
|
||||
let column = if let Some(ref column) = column_grouper {
|
||||
@ -149,7 +149,7 @@ pub async fn histogram(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||
.ok_or_else(|| {
|
||||
ShellError::labeled_error(
|
||||
"Unable to load group labels",
|
||||
"unabled to load group labels",
|
||||
"unable to load group labels",
|
||||
&name,
|
||||
)
|
||||
})?
|
||||
|
@ -14,7 +14,7 @@ impl WholeStreamCommand for SubCommand {
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build("math celi")
|
||||
Signature::build("math ceil")
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
|
@ -120,7 +120,7 @@ pub fn compute_stddev(values: &[Value], n: usize, name: &Tag) -> Result<Value, S
|
||||
_ => {
|
||||
return Err(ShellError::labeled_error(
|
||||
"Could not take square root of variance",
|
||||
"error occured here",
|
||||
"error occurred here",
|
||||
name.span,
|
||||
))
|
||||
}
|
||||
@ -129,7 +129,7 @@ pub fn compute_stddev(values: &[Value], n: usize, name: &Tag) -> Result<Value, S
|
||||
Some(stddev) => Ok(UntaggedValue::from(Primitive::Decimal(stddev)).into_value(name)),
|
||||
None => Err(ShellError::labeled_error(
|
||||
"Could not calculate stddev",
|
||||
"error occured here",
|
||||
"error occurred here",
|
||||
name.span,
|
||||
)),
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ impl WholeStreamCommand for SubCommand {
|
||||
SyntaxShape::ColumnPath,
|
||||
"optionally find and replace text by column paths",
|
||||
)
|
||||
.switch("all", "replace all occurences of find string", Some('a'))
|
||||
.switch("all", "replace all occurrences of find string", Some('a'))
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
|
@ -80,7 +80,7 @@ impl Scope {
|
||||
}
|
||||
|
||||
pub fn get_vars(&self) -> IndexMap<String, Value> {
|
||||
//FIXME: should this be an interator?
|
||||
//FIXME: should this be an iterator?
|
||||
let mut output = IndexMap::new();
|
||||
|
||||
for frame in self.frames.lock().iter().rev() {
|
||||
@ -93,7 +93,7 @@ impl Scope {
|
||||
}
|
||||
|
||||
pub fn get_env_vars(&self) -> IndexMap<String, String> {
|
||||
//FIXME: should this be an interator?
|
||||
//FIXME: should this be an iterator?
|
||||
let mut output = IndexMap::new();
|
||||
|
||||
for frame in self.frames.lock().iter().rev() {
|
||||
@ -242,7 +242,7 @@ impl ScopeFrame {
|
||||
|
||||
// impl Scope {
|
||||
// pub fn vars(&self) -> IndexMap<String, Value> {
|
||||
// //FIXME: should this be an interator?
|
||||
// //FIXME: should this be an iterator?
|
||||
|
||||
// let mut output = IndexMap::new();
|
||||
|
||||
@ -262,7 +262,7 @@ impl ScopeFrame {
|
||||
// }
|
||||
|
||||
// pub fn env(&self) -> IndexMap<String, String> {
|
||||
// //FIXME: should this be an interator?
|
||||
// //FIXME: should this be an iterator?
|
||||
|
||||
// let mut output = IndexMap::new();
|
||||
|
||||
|
@ -89,8 +89,8 @@ pub async fn process_script(
|
||||
let name = args
|
||||
.positional
|
||||
.as_ref()
|
||||
.and_then(|potionals| {
|
||||
potionals.get(0).map(|e| {
|
||||
.and_then(|positionals| {
|
||||
positionals.get(0).map(|e| {
|
||||
if let Expression::Literal(Literal::String(ref s)) = e.expr {
|
||||
&s
|
||||
} else {
|
||||
|
@ -265,7 +265,7 @@ impl ThemeColor {
|
||||
match character {
|
||||
b'0'..=b'9' => Ok(character - b'0'),
|
||||
b'a'..=b'z' => Ok(character - (b'a' - 10)),
|
||||
_ => Err(E::custom(format!("invalid charater {}", character))),
|
||||
_ => Err(E::custom(format!("invalid character {}", character))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ fn flatten_nested_tables() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn flatten_row_column_explictly() {
|
||||
fn flatten_row_column_explicitly() {
|
||||
Playground::setup("flatten_test_1", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"katz.json",
|
||||
@ -113,7 +113,7 @@ fn flatten_row_columns_having_same_column_names_flats_separately() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn flatten_table_columns_explictly() {
|
||||
fn flatten_table_columns_explicitly() {
|
||||
Playground::setup("flatten_test_3", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"katz.json",
|
||||
|
@ -30,7 +30,7 @@ fn add() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn add_compount() {
|
||||
fn add_compound() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
|
Reference in New Issue
Block a user