summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRory Dudley2024-03-28 16:35:14 -0600
committerRory Dudley2024-03-28 16:35:14 -0600
commit9b2fcdb6bb6598786827e9f211df3db09de54567 (patch)
tree1420231a97aea7dce6893d13bad29a3c432e106f
parentb35660fc15308c179b90c30e6faa46d5066ba1ec (diff)
downloaddwarvish-9b2fcdb6bb6598786827e9f211df3db09de54567.tar.gz
Update docs for repl()read
Updated the docs for repl() in main.rs, to include the 'at_prompt' function parameter.
-rw-r--r--src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 6a51496..951c46f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,8 +8,9 @@ use poem::{read::Readable, recite::Reciteable, Poem};
/// Starts the main shell loop
///
/// # Arguments
-/// * `paths` - A reference to a vector that holds a list to the shell $PATHs
+/// * `path` - A reference to a vector that holds a list to the shell $PATHs
/// * `prompt` - A string slice indicating the shell's prompt
+/// * `at_prompt` - A mutex, indicating whether or not user is at the prompt
///
/// # Examples
/// ```
@@ -17,8 +18,9 @@ use poem::{read::Readable, recite::Reciteable, Poem};
/// let path = vec!["/bin"];
/// let path = path.into_iter().map(Path::new).collect();
/// let prompt = "|> ";
+/// let mut at_prompt = Arc::new(Mutex::new(false));
/// ...
-/// repl(&path, prompt);
+/// repl(&path, prompt, &mut at_prompt);
/// }
/// ```
fn repl(path: &Vec<&Path>, prompt: &str, at_prompt: &mut Arc<Mutex<bool>>) {