summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenji Nguyen <45523555+solidiquis@users.noreply.github.com>2023-06-26 10:54:40 -0700
committerGitHub <noreply@github.com>2023-06-26 10:54:40 -0700
commit5e0e229798f9237f7bfc1b80a79e4987df731d8e (patch)
treeb9fdd4b28b4f752a3f8f5d622e910a0630ba88b6
parentcb3a5df076c1746206c783657f1d5a67185edbdd (diff)
parent2e5e8ca99c94e2026effb4761b9040ea33e99d3c (diff)
Merge pull request #207 from solidiquis/time-aliases
Time aliases
-rw-r--r--README.md14
-rw-r--r--src/context/time.rs9
2 files changed, 13 insertions, 10 deletions
diff --git a/README.md b/README.md
index 43ca476..48d4d30 100644
--- a/README.md
+++ b/README.md
@@ -134,9 +134,9 @@ Options:
Which kind of timestamp to use; modified by default
Possible values:
- - create: Timestamp showing when the file was created
- - access: Timestamp showing when the file was last accessed
- - mod: Timestamp showing when the file was last modified
+ - create: Time created (alias: ctime)
+ - access: Time last accessed (alias: atime)
+ - mod: Time last modified (alias: mtime)
--time-format <TIME_FORMAT>
Which format to use for the timestamp; default by default
@@ -676,13 +676,13 @@ Currently only available on Unix-like platforms. Support for Windows is planned.
--octal
Show permissions in numeric octal format instead of symbolic
- --time <TIME>
+ --time <TIME>
Which kind of timestamp to use; modified by default
Possible values:
- - create: Timestamp showing when the file was created
- - access: Timestamp showing when the file was last accessed
- - mod: Timestamp showing when the file was last modified
+ - create: Time created (alias: ctime)
+ - access: Time last accessed (alias: atime)
+ - mod: Time last modified (alias: mtime)
--time-format <TIME_FORMAT>
Which format to use for the timestamp; default by default
diff --git a/src/context/time.rs b/src/context/time.rs
index b1e03b4..88f9657 100644
--- a/src/context/time.rs
+++ b/src/context/time.rs
@@ -3,14 +3,17 @@ use clap::ValueEnum;
/// Different types of timestamps available in long-view.
#[derive(Copy, Clone, Debug, ValueEnum, PartialEq, Eq, PartialOrd, Ord, Default)]
pub enum Stamp {
- /// Timestamp showing when the file was created.
+ /// Time created (alias: ctime)
+ #[value(alias("ctime"))]
Create,
- /// Timestamp showing when the file was last accessed.
+ /// Time last accessed (alias: atime)
+ #[value(alias("atime"))]
Access,
- /// Timestamp showing when the file was last modified.
+ /// Time last modified (alias: mtime)
#[default]
+ #[value(alias("mtime"))]
Mod,
}