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
11 changes: 11 additions & 0 deletions src/uu/realpath/locales/en-US.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
realpath-about = Print the resolved path
realpath-usage = realpath [OPTION]... FILE...

# Help messages
realpath-help-quiet = Do not print warnings for invalid paths
realpath-help-strip = Only strip '.' and '..' components, but don't resolve symbolic links
realpath-help-zero = Separate output filenames with \0 rather than newline
realpath-help-logical = resolve '..' components before symlinks
realpath-help-physical = resolve symlinks as encountered (default)
realpath-help-canonicalize-existing = canonicalize by following every symlink in every component of the given name recursively, all components must exist
realpath-help-canonicalize-missing = canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence
realpath-help-relative-to = print the resolved path relative to DIR
realpath-help-relative-base = print absolute paths unless paths below DIR
13 changes: 13 additions & 0 deletions src/uu/realpath/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
realpath-about = Afficher le chemin résolu
realpath-usage = realpath [OPTION]... FICHIER...

# Messages d'aide
realpath-help-quiet = Ne pas afficher d'avertissements pour les chemins invalides
realpath-help-strip = Supprimer uniquement les composants '.' et '..', mais ne pas résoudre les liens symboliques
realpath-help-zero = Séparer les noms de fichiers de sortie avec \0 plutôt qu'avec un saut de ligne
realpath-help-logical = résoudre les composants '..' avant les liens symboliques
realpath-help-physical = résoudre les liens symboliques rencontrés (par défaut)
realpath-help-canonicalize-existing = canonicaliser en suivant récursivement chaque lien symbolique dans chaque composant du nom donné, tous les composants doivent exister
realpath-help-canonicalize-missing = canonicaliser en suivant récursivement chaque lien symbolique dans chaque composant du nom donné, sans exigences sur l'existence des composants
realpath-help-relative-to = afficher le chemin résolu relativement à RÉP
realpath-help-relative-base = afficher les chemins absolus sauf pour les chemins sous RÉP
24 changes: 9 additions & 15 deletions src/uu/realpath/src/realpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,72 +93,66 @@ pub fn uu_app() -> Command {
Arg::new(OPT_QUIET)
.short('q')
.long(OPT_QUIET)
.help("Do not print warnings for invalid paths")
.help(get_message("realpath-help-quiet"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_STRIP)
.short('s')
.long(OPT_STRIP)
.visible_alias("no-symlinks")
.help("Only strip '.' and '..' components, but don't resolve symbolic links")
.help(get_message("realpath-help-strip"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_ZERO)
.short('z')
.long(OPT_ZERO)
.help("Separate output filenames with \\0 rather than newline")
.help(get_message("realpath-help-zero"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_LOGICAL)
.short('L')
.long(OPT_LOGICAL)
.help("resolve '..' components before symlinks")
.help(get_message("realpath-help-logical"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_PHYSICAL)
.short('P')
.long(OPT_PHYSICAL)
.overrides_with_all([OPT_STRIP, OPT_LOGICAL])
.help("resolve symlinks as encountered (default)")
.help(get_message("realpath-help-physical"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_CANONICALIZE_EXISTING)
.short('e')
.long(OPT_CANONICALIZE_EXISTING)
.help(
"canonicalize by following every symlink in every component of the \
given name recursively, all components must exist",
)
.help(get_message("realpath-help-canonicalize-existing"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_CANONICALIZE_MISSING)
.short('m')
.long(OPT_CANONICALIZE_MISSING)
.help(
"canonicalize by following every symlink in every component of the \
given name recursively, without requirements on components existence",
)
.help(get_message("realpath-help-canonicalize-missing"))
.action(ArgAction::SetTrue),
)
.arg(
Arg::new(OPT_RELATIVE_TO)
.long(OPT_RELATIVE_TO)
.value_name("DIR")
.value_parser(NonEmptyStringValueParser::new())
.help("print the resolved path relative to DIR"),
.help(get_message("realpath-help-relative-to")),
)
.arg(
Arg::new(OPT_RELATIVE_BASE)
.long(OPT_RELATIVE_BASE)
.value_name("DIR")
.value_parser(NonEmptyStringValueParser::new())
.help("print absolute paths unless paths below DIR"),
.help(get_message("realpath-help-relative-base")),
)
.arg(
Arg::new(ARG_FILES)
Expand Down
Loading