-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add --user flag to install skills at user level #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,7 +148,7 @@ impl Cli { | |
| Commands::SatisfyingSort => commands::satisfying_sort::handle().await, | ||
| Commands::Repos { command } => commands::repos::handle(command, &self).await, | ||
| Commands::Scans { command } => commands::scans::handle(command, &self).await, | ||
| Commands::Skill { command } => commands::skill::handle(command.as_ref()), | ||
| Commands::Skill { user, command } => commands::skill::handle(command.as_ref(), *user), | ||
| Commands::Update => commands::update::handle().await, | ||
| Commands::Version => { | ||
| console::Term::stdout().write_line(&format!("detail-cli v{VERSION}"))?; | ||
|
|
@@ -209,6 +209,10 @@ enum Commands { | |
|
|
||
| /// Install Detail skills (default: detail-bugs) | ||
| Skill { | ||
| /// Install to user-level ~/.claude/skills instead of the current repo | ||
| #[arg(long, global = true)] | ||
| user: bool, | ||
|
Comment on lines
+212
to
+214
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 Info: global = true on --user propagates to subcommands but isn't shown in subcommand help The Was this helpful? React with 👍 or 👎 to provide feedback.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call — added |
||
|
|
||
| #[command(subcommand)] | ||
| command: Option<commands::skill::SkillCommands>, | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Info:
user_home()follows existingmy_home()error-handling patternThe new
user_home()function atsrc/commands/skill.rs:33-37uses the same double-.context()pattern assrc/config/storage.rs:47-49to handle theResult<Option<PathBuf>>return type ofhomedir::my_home(). This is consistent and correct — the first.context()handles IO errors and the second handles theNonecase (home directory not found).Was this helpful? React with 👍 or 👎 to provide feedback.