You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/nu-command/src/filesystem/touch.rs
+1-137Lines changed: 1 addition & 137 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,14 @@
1
1
use std::fs::OpenOptions;
2
2
use std::path::Path;
3
3
4
-
use chrono::{DateTime,Datelike,Local};
4
+
use chrono::{DateTime,Local};
5
5
use filetime::FileTime;
6
6
7
7
use nu_engine::CallExt;
8
8
use nu_protocol::ast::Call;
9
9
use nu_protocol::engine::{Command,EngineState,Stack};
10
10
use nu_protocol::{Category,Example,PipelineData,ShellError,Signature,Spanned,SyntaxShape};
11
11
12
-
usecrate::parse_date_from_string;
13
-
14
-
enumAddYear{
15
-
Full,
16
-
FirstDigits,
17
-
}
18
-
19
12
#[derive(Clone)]
20
13
pubstructTouch;
21
14
@@ -35,18 +28,6 @@ impl Command for Touch {
35
28
SyntaxShape::Filepath,
36
29
"the path of the file you want to create",
37
30
)
38
-
.named(
39
-
"timestamp",
40
-
SyntaxShape::String,
41
-
"change the file or directory time to a timestamp. Format: [[CC]YY]MMDDhhmm[.ss]\n\n If neither YY or CC is given, the current year will be assumed. If YY is specified, but CC is not, CC will be derived as follows:\n\tIf YY is between [69, 99], CC is 19\n\tIf YY is between [00, 68], CC is 20\n Note: It is expected that in a future version of this standard the default century inferred from a 2-digit year will change",
0 commit comments