From 9b2fcdb6bb6598786827e9f211df3db09de54567 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Thu, 28 Mar 2024 16:35:14 -0600 Subject: Update docs for repl() Updated the docs for repl() in main.rs, to include the 'at_prompt' function parameter. --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main.rs') 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>) { -- cgit v1.2.3