diff --git a/doc/shell.rs b/doc/shell.rs index 2f42364a..f085156c 100644 --- a/doc/shell.rs +++ b/doc/shell.rs @@ -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, diff --git a/src/program/posix/lex.rs b/src/program/posix/lex.rs index 8132812e..10b79ee2 100644 --- a/src/program/posix/lex.rs +++ b/src/program/posix/lex.rs @@ -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, @@ -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, @@ -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)) @@ -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)) @@ -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; diff --git a/src/program/posix/mod.rs b/src/program/posix/mod.rs index 4f3349b8..12364c36 100644 --- a/src/program/posix/mod.rs +++ b/src/program/posix/mod.rs @@ -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 diff --git a/src/repl/completion.rs b/src/repl/completion.rs index a568c1ad..b98879cc 100644 --- a/src/repl/completion.rs +++ b/src/repl/completion.rs @@ -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. @@ -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 { match *self { Completion::None => vec![], diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 18616d8c..227158bd 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -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. @@ -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() {