Skip to content

Commit

Permalink
Enhance manpage for rage-mount
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Jan 25, 2024
1 parent d907b6a commit 5bedf77
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 3 deletions.
13 changes: 12 additions & 1 deletion rage/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,18 @@ impl Cli {
out_dir,
"rage-mount",
"rage-keygen(1), rage(1)",
self.rage_mount.about(fl!("man-mount-about")),
self.rage_mount
.about(fl!("man-mount-about"))
.long_about(fl!("man-mount-description"))
.mut_arg("types", |a| {
a.long_help(fl!(
"man-mount-flag-types",
types = crate::rage_mount::TYPES,
))
})
.mut_arg("identity", |a| {
a.long_help(fl!("man-rage-flag-identity-decrypt"))
}),
|_, w| {
Examples([
Example::new(fl!("man-mount-example-identity"))
Expand Down
25 changes: 24 additions & 1 deletion rage/i18n/en-US/rage.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-identity-prefix = AGE-SECRET-KEY-1
-armor-pem-type = AGE ENCRYPTED FILE
-rage-mount = rage-mount
-ssh-rsa = ssh-rsa
-ssh-ed25519 = ssh-ed25519
-ssh-authorized-keys = authorized_keys
Expand Down Expand Up @@ -480,7 +482,28 @@ man-keygen-example-convert = Convert an identity to a recipient
## rage-mount manpage

man-mount-about = Mount an age-encrypted filesystem
man-mount-about = Mount an {-age} encrypted filesystem
man-mount-description =
{-rage-mount} decrypts the {-age} encrypted filesystem at {mnt-filename} on the
fly, and mounts it as a directory on the local filesystem at {mnt-mountpoint}.
Passphrase-encrypted files are detected automatically and the passphrase is
requested interactively. Otherwise, one or more {identities} specified with
{-flag-identity} are used to decrypt the file.
The previous contents (if any) and owner and mode of {mnt-mountpoint} become
invisible, and as long as this filesystem remains mounted, the pathname
{mnt-mountpoint} refers to the root of the filesystem on {mnt-filename}.
man-mount-flag-types =
Set the filesystem type. The following types are currently supported: {$types}.
This option is required. {-rage-mount} does not attempt to guess the filesystem
format.
In theory, any efficiently-seekable filesystem format can be supported. At
present, {-rage-mount} only supports seekable archive formats.
man-mount-example-identity = Mounting an archive encrypted to a recipient
man-mount-example-passphrase = Mounting an archive encrypted with a passphrase
2 changes: 2 additions & 0 deletions rage/i18n/es-AR/rage.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-identity-prefix = AGE-SECRET-KEY-1
-armor-pem-type = AGE ENCRYPTED FILE
-rage-mount = rage-mount
-ssh-rsa = ssh-rsa
-ssh-ed25519 = ssh-ed25519
-ssh-authorized-keys = authorized_keys
Expand Down
2 changes: 2 additions & 0 deletions rage/i18n/it/rage.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-identity-prefix = AGE-SECRET-KEY-1
-armor-pem-type = AGE ENCRYPTED FILE
-rage-mount = rage-mount
-ssh-rsa = ssh-rsa
-ssh-ed25519 = ssh-ed25519
-ssh-authorized-keys = authorized_keys
Expand Down
2 changes: 2 additions & 0 deletions rage/i18n/zh-CN/rage.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-identity-prefix = AGE-SECRET-KEY-1
-armor-pem-type = AGE ENCRYPTED FILE
-rage-mount = rage-mount
-ssh-rsa = ssh-rsa
-ssh-ed25519 = ssh-ed25519
-ssh-authorized-keys = authorized_keys
Expand Down
2 changes: 2 additions & 0 deletions rage/i18n/zh-TW/rage.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-identity-prefix = AGE-SECRET-KEY-1
-armor-pem-type = AGE ENCRYPTED FILE
-rage-mount = rage-mount
-ssh-rsa = ssh-rsa
-ssh-ed25519 = ssh-ed25519
-ssh-authorized-keys = authorized_keys
Expand Down
4 changes: 3 additions & 1 deletion rage/src/bin/rage-mount/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ use clap::{builder::Styles, ArgAction, Parser};

use crate::fl;

pub(crate) const TYPES: &str = "\"tar\", \"zip\"";

#[derive(Debug, Parser)]
#[command(display_name = "rage-mount")]
#[command(name = "rage-mount")]
Expand Down Expand Up @@ -39,7 +41,7 @@ pub(crate) struct AgeMountOptions {

#[arg(short, long)]
#[arg(value_name = fl!("mnt-types"))]
#[arg(help = fl!("help-arg-mnt-types", types = "\"tar\", \"zip\""))]
#[arg(help = fl!("help-arg-mnt-types", types = TYPES))]
pub(crate) types: String,

#[arg(long, value_name = "WF")]
Expand Down

0 comments on commit 5bedf77

Please sign in to comment.