From 791b61f97e3ee12dfd765f5e23edd5df527eb803 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Sun, 31 Mar 2024 00:50:03 -0600 Subject: Add docstring comments to all the anthology functions Add docstring comments for all the incant function throughout the anthology, documenting what each function does, and an example of it's shell command. --- src/poem/anthology/source.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/poem/anthology/source.rs') diff --git a/src/poem/anthology/source.rs b/src/poem/anthology/source.rs index b4148cb..ed4ed13 100644 --- a/src/poem/anthology/source.rs +++ b/src/poem/anthology/source.rs @@ -3,6 +3,15 @@ use crate::poem::Verse; use crate::poem::{read::Readable, recite::Reciteable, Poem}; use std::fs; +/// source +/// +/// The builtin `source` command. Used to change the shell's global environment +/// state via a `.sh` or `.dwvsh` file. +/// +/// # Shell Examples +/// ```sh +/// source ~/.dwvshrc +/// ``` pub fn incant(verse: &Verse, env: &mut Environment) -> i32 { let files = match verse.clause() { Some(clause) => clause, -- cgit v1.2.3