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)])
| 256 | /// atomic status See what's changed |
| 257 | /// ``` |
| 258 | pub fn print_next_steps(steps: &[(&str, &str)]) { |
| 259 | if steps.is_empty() { |
| 260 | return; |
| 261 | } |
| 262 | |
| 263 | println!(); |
| 264 | println!("{}", hint("Next steps:")); |
| 265 | |
| 266 | // Calculate max command width for alignment |
| 267 | let max_cmd_width = steps.iter().map(|(cmd, _)| cmd.len()).max().unwrap_or(0); |
| 268 | |
| 269 | for (cmd, desc) in steps { |
| 270 | let padding = max_cmd_width - cmd.len() + 2; |
| 271 | println!(" {}{}{}", command(cmd), " ".repeat(padding), hint(desc)); |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | // Confirmation Prompt |
| 276 |