-
Notifications
You must be signed in to change notification settings - Fork 192
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
feat: alias management commands (#25) #159
Conversation
#[clap(visible_aliases = ["add", "create"], after_long_help = AFTER_LONG_HELP.as_str(), verbatim_doc_comment)] | ||
pub struct AliasSet { | ||
/// The plugin to set the alias for | ||
pub plugin: String, |
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.
these shouldn't use pub
(unless I'm missing something)
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.
i was wondering about this as well but it seems other commands also define those as public
I think I like multiple arguments the most. For runtimes I've settled on using
This is because it's a root command. It has to use an option because if you ran
worth noting but I think we can live with this
yep, good catch |
- consolidate color utilities
- alphabetize commands
Codecov ReportBase: 81.77% // Head: 82.14% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
==========================================
+ Coverage 81.77% 82.14% +0.37%
==========================================
Files 86 89 +3
Lines 2809 2845 +36
==========================================
+ Hits 2297 2337 +40
+ Misses 512 508 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
- regenerate help and completions
|
||
/// Show an alias for a plugin | ||
/// | ||
/// This is the contents of an alias.<PLUGIN> entry in ~/.config/rtx/config.toml |
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.
this is probably out of scope, but I wonder if we could generate this path using env::CONFIG_FILE_PATH
or whatever that is.
Don't worry about this one unless you're particularly curious.
I'll go ahead and merge this once the tests pass |
thanks again for the help! |
This is a draft on the
alias
management commands.Couple of caveats
"<PLUGIN>.<ALIAS>"
(or even"<PLUGIN@ALIAS>"
?)ls
command uses option-p
to specify a plugin but since this is for filtering this might not be an inconsistency[alias]
section in theconfig.toml
aliases
(singular/plural) inrtxrc.rs