Skip to content

Commit

Permalink
Fix typos (#209)
Browse files Browse the repository at this point in the history
Found via `typos --hidden --format brief`
  • Loading branch information
kianmeng committed Dec 29, 2023
1 parent 6fe8d37 commit 17deddb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ All prompts provide an API to set custom formatters. By setting a formatter, you

Custom formatters receive the input as an argument, with varying types such as `&str`, `chrono::NaiveDate`, and return a `String` containing the output to be displayed to the user. Check the docs for specific examples.

In the [demo](#demo) you can see this behavior in action with the _amount_ (CustomType) prompt, where a custom formatter adds a '$' character preffix to the input.
In the [demo](#demo) you can see this behavior in action with the _amount_ (CustomType) prompt, where a custom formatter adds a '$' character prefix to the input.

## Parsing

Expand Down Expand Up @@ -221,7 +221,7 @@ You can call `with_autocomplete()` and provide a value that implements the `Auto

For example, in the `complex_autocompletion.rs` example file, the `FilePathCompleter` scans the file system based on the current text input, storing a list of paths that match the current text input.

Everytime `get_suggestions` is called, the method returns the list of paths that match the user input. When the user presses the autocompletion hotkey, the `FilePathCompleter` checks whether there is any path selected from the list, if there is, it decides to replace the current text input for it. The interesting piece of functionality is that if there isn't a path selected from the list, the `FilePathCompleter` calculates the longest common prefix amongst all scanned paths and updates the text input to an unambiguous new value. Similar to how terminals work when traversing paths.
Every time `get_suggestions` is called, the method returns the list of paths that match the user input. When the user presses the autocompletion hotkey, the `FilePathCompleter` checks whether there is any path selected from the list, if there is, it decides to replace the current text input for it. The interesting piece of functionality is that if there isn't a path selected from the list, the `FilePathCompleter` calculates the longest common prefix amongst all scanned paths and updates the text input to an unambiguous new value. Similar to how terminals work when traversing paths.

### Default behaviors

Expand Down
2 changes: 1 addition & 1 deletion inquire/src/autocompletion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub type Replacement = Option<String>;
///
/// For example, in the `complex_autocompletion.rs` example file, the `FilePathCompleter` scans the file system based on the current text input, storing a list of paths that match the current text input.
///
/// Everytime `get_suggestions` is called, the method returns the list of paths that match the user input. When the user presses the autocompletion hotkey, the `FilePathCompleter` checks whether there is any path selected from the list, if there is, it decides to replace the current text input for it. The interesting piece of functionality is that if there isn't a path selected from the list, the `FilePathCompleter` calculates the longest common prefix amongst all scanned paths and updates the text input to an unambiguous new value. Similar to how terminals work when traversing paths.
/// Every time `get_suggestions` is called, the method returns the list of paths that match the user input. When the user presses the autocompletion hotkey, the `FilePathCompleter` checks whether there is any path selected from the list, if there is, it decides to replace the current text input for it. The interesting piece of functionality is that if there isn't a path selected from the list, the `FilePathCompleter` calculates the longest common prefix amongst all scanned paths and updates the text input to an unambiguous new value. Similar to how terminals work when traversing paths.
pub trait Autocomplete: DynClone {
/// List of input suggestions to be displayed to the user upon typing the
/// text input.
Expand Down
2 changes: 1 addition & 1 deletion inquire/src/prompts/multiselect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ where

/// Sets the starting cursor index.
///
/// This index might be overriden if the `reset_cursor` option is set to true (default)
/// This index might be overridden if the `reset_cursor` option is set to true (default)
/// and starting_filter_input is set to something other than None.
pub fn with_starting_cursor(mut self, starting_cursor: usize) -> Self {
self.starting_cursor = starting_cursor;
Expand Down
2 changes: 1 addition & 1 deletion inquire/src/prompts/select/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ where

/// Sets the starting cursor index.
///
/// This index might be overriden if the `reset_cursor` option is set to true (default)
/// This index might be overridden if the `reset_cursor` option is set to true (default)
/// and starting_filter_input is set to something other than None.
pub fn with_starting_cursor(mut self, starting_cursor: usize) -> Self {
self.starting_cursor = starting_cursor;
Expand Down
2 changes: 1 addition & 1 deletion inquire/src/prompts/text/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const DEFAULT_HELP_MESSAGE_WITH_AC: &str = "↑↓ to move, tab to autocomplete,
///
/// For example, in the `complex_autocompletion.rs` example file, the `FilePathCompleter` scans the file system based on the current text input, storing a list of paths that match the current text input.
///
/// Everytime `get_suggestions` is called, the method returns the list of paths that match the user input. When the user presses the autocompletion hotkey, the `FilePathCompleter` checks whether there is any path selected from the list, if there is, it decides to replace the current text input for it. The interesting piece of functionality is that if there isn't a path selected from the list, the `FilePathCompleter` calculates the longest common prefix amongst all scanned paths and updates the text input to an unambiguous new value. Similar to how terminals work when traversing paths.
/// Every time `get_suggestions` is called, the method returns the list of paths that match the user input. When the user presses the autocompletion hotkey, the `FilePathCompleter` checks whether there is any path selected from the list, if there is, it decides to replace the current text input for it. The interesting piece of functionality is that if there isn't a path selected from the list, the `FilePathCompleter` calculates the longest common prefix amongst all scanned paths and updates the text input to an unambiguous new value. Similar to how terminals work when traversing paths.
///
/// # Example
///
Expand Down
2 changes: 1 addition & 1 deletion inquire/src/ui/render_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ pub mod calendar {
/// When `None`, no custom style sheet will be applied and the native
/// terminal cursor will be used in the first char of the date number.
///
/// Whem `Some(_)`, the style sheet will be applied to the two columns
/// When `Some(_)`, the style sheet will be applied to the two columns
/// where the number is positioned, padded to spaces in the left if the
/// number only has one digit. e.g. " 5" or "23".
pub selected_date: Option<StyleSheet>,
Expand Down

0 comments on commit 17deddb

Please sign in to comment.