Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion diffr/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,17 @@ fn prompt(state: &State) -> Result<i32> {
}
(Err(error), None) => return Err(error),
}
cliclack::outro("diffr is ready to use! Hope you enjoy some beautiful diffs")?;
let usage: String = answers
.agents
.iter()
.map(|agent| format!("{}\n", agent.usage()))
.collect();
cliclack::outro(format!(
"diffr is ready to use!
Run `diffr <args>` with the same arguments you'd pass to `git diff`, e.g. `diffr main..HEAD`.
To change diffr settings at any time, run `diffr config`.
{usage}
Hope you enjoy some beautiful diffs."
))?;
Ok(0)
}
9 changes: 9 additions & 0 deletions diffr/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ impl Agent {
}
}

/// How to reach diffr from inside the agent, shown once its plugin is installed.
pub(crate) fn usage(self) -> &'static str {
match self {
Agent::ClaudeCode => {
"In Claude Code, run `/diffr <args>`, or ask Claude to show you a change with diffr."
}
}
}

/// `step` hears what each slow command is about to do.
pub(crate) fn install(self, step: &mut dyn FnMut(&str)) -> Result<()> {
match self {
Expand Down
Loading