Skip to content

Commit

Permalink
Fix typos (#69)
Browse files Browse the repository at this point in the history
The typos were found with the "typos" spell checker.[1]

[1]: https://github.com/crate-ci/typos
  • Loading branch information
not-my-profile authored Sep 13, 2023
1 parent 2471472 commit c9ee501
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() {
// types. By default the underlying file is line buffered. This
// will allow us to process history, syntax, and more!

// Read what's avalible to us.
// Read what's available to us.
stdin.read(&mut input).expect("error reading STDIN");

// Once we've read a complete "program" (§2.10.2) we handle it,
Expand Down
10 changes: 5 additions & 5 deletions src/program/posix/lex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub enum Error {
UnrecognizedChar(usize, char, usize),
}

/// Every token in the langauge, these are the terminals of the grammar.
/// Every token in the language, these are the terminals of the grammar.
#[derive(Eq, PartialEq, Clone, Debug)]
pub enum Token<'input> {
Space,
Expand Down Expand Up @@ -71,7 +71,7 @@ pub enum Token<'input> {
Text(&'input str),
}

/// A lexer to feed the parser gernerated by LALRPOP.
/// A lexer to feed the parser generated by LALRPOP.
pub struct Lexer<'input> {
/// The original text.
input: &'input str,
Expand Down Expand Up @@ -265,7 +265,7 @@ impl<'input> Lexer<'input> {
fn single_quote(&mut self, start: usize, end: usize)
-> Result<(usize, Token<'input>, usize), Error>
{
// TODO: This quitely stops at EOF.
// TODO: This quietly stops at EOF.
let (_, end) = self.take_while(start, end, |c| c != '\'');
self.advance(); // Consume the ending single quote.
Ok((start, Token::Word(&self.input[start+1..end]), end))
Expand All @@ -276,7 +276,7 @@ impl<'input> Lexer<'input> {
fn double_quote(&mut self, start: usize, end: usize)
-> Result<(usize, Token<'input>, usize), Error>
{
// TODO: This quitely stops at EOF.
// TODO: This quietly stops at EOF.
let (input, end) = self.take_while(start, end, |c| c != '"');
self.advance(); // Consume the ending double quote.
Ok((start, Token::Word(&input[1..]), end))
Expand Down Expand Up @@ -326,7 +326,7 @@ impl<'input> Lexer<'input> {
self.advance(); // Consume the '#'.
if let Some((_, '!', s)) = self.lookahead {
let (_, end) = self.take_until(s, end, |c| c == ';');
self.advance(); // Consume the ';' delimeter.
self.advance(); // Consume the ';' delimiter.
self.take_while(end, end, |c| c.is_whitespace());
self.in_shebang = true;

Expand Down
2 changes: 1 addition & 1 deletion src/program/posix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
//! ```
//!
//! Variables are loaded from the environment (often simply called `ENV`) as
//! well. For more information on the enviroment read
//! well. For more information on the environment read
//! [section 8.1](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html).
//!
//! ```sh
Expand Down
4 changes: 2 additions & 2 deletions src/repl/completion.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! User text completion for REPL interations.
//! User text completion for REPL inputs.
//!
//! Simple use cases for this module should be as easy as the following
//! example taken from the current REPL.
Expand Down Expand Up @@ -62,7 +62,7 @@ impl Completion {
}
}

/// Return a list of all the possibile complete matches.
/// Return a list of all the possible complete matches.
pub fn possibilities(&self) -> Vec<String> {
match *self {
Completion::None => vec![],
Expand Down
4 changes: 2 additions & 2 deletions src/repl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn raw_loop(stdin: Stdin, stdout: Stdout, io: &mut IO, jobs: &mut Jobs, args: &m
let mut stdout = stdout.into_raw_mode()
.expect("error opening raw mode");

// Display the inital prompt.
// Display the initial prompt.
prompt::ps1(&mut stdout);

// XXX: Hack to get the prompt length.
Expand Down Expand Up @@ -113,7 +113,7 @@ fn raw_loop(stdin: Stdin, stdout: Stdout, io: &mut IO, jobs: &mut Jobs, args: &m

#[cfg(not(feature = "raw"))]
fn buffered_loop(stdin: Stdin, mut stdout: Stdout, io: &mut IO, jobs: &mut Jobs, args: &mut ArgvMap) {
// Display the inital prompt.
// Display the initial prompt.
prompt::ps1(&mut stdout);

for line in stdin.lock().lines() {
Expand Down

0 comments on commit c9ee501

Please sign in to comment.