Skip to content

Commit

Permalink
feat(rust): add "unsafe" tag to commands that are considered unsafe
Browse files Browse the repository at this point in the history
Signed-off-by: Wryhder <[email protected]>
  • Loading branch information
Wryhder committed Nov 18, 2024
1 parent 8c41b35 commit e806e64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::{docs, OckamCommand};

const LONG_ABOUT: &str = include_str!("./static/long_about.txt");
const PREVIEW_TAG: &str = include_str!("../static/preview_tag.txt");
const UNSAFE_TAG: &str = include_str!("../static/unsafe_tag.txt");
const AFTER_LONG_HELP: &str = include_str!("./static/after_long_help.txt");

/// Generate shell completion scripts
Expand All @@ -15,6 +16,8 @@ const AFTER_LONG_HELP: &str = include_str!("./static/after_long_help.txt");
arg_required_else_help = true,
long_about = docs::about(LONG_ABOUT),
before_help = docs::before_help(PREVIEW_TAG),
// TODO: What's the correct way to include the unsafe tag here?
before_help = docs::before_help(UNSAFE_TAG),
after_long_help = docs::after_help(AFTER_LONG_HELP)
)]
pub struct CompletionCommand {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Unsafe]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Unsafe features are considered dangerous and are best avoided. Use with caution if at all.

0 comments on commit e806e64

Please sign in to comment.