Print a "next steps" section to guide users. This function formats a list of suggested commands that the user might want to run next. It's designed to help users learn the workflow and discover related commands. # Arguments `steps` - A slice of (command, description) pairs # Example ```rust,ignore print_next_steps(&[ ("atomic add ", "Add files to track"), ("atomic record -m \"...\"", "
(steps: &[(&str, &str)])
| 213 | /// atomic status See what's changed |
| 214 | /// ``` |
| 215 | pub fn print_next_steps(steps: &[(&str, &str)]) { |
| 216 | if steps.is_empty() { |
| 217 | return; |
| 218 | } |
| 219 | |
| 220 | println!(); |
| 221 | println!("{}", hint("Next steps:")); |
| 222 | |
| 223 | // Calculate max command width for alignment |
| 224 | let max_cmd_width = steps.iter().map(|(cmd, _)| cmd.len()).max().unwrap_or(0); |
| 225 | |
| 226 | for (cmd, desc) in steps { |
| 227 | let padding = max_cmd_width - cmd.len() + 2; |
| 228 | println!(" {}{}{}", command(cmd), " ".repeat(padding), hint(desc)); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | // Confirmation Prompt |
| 233 |