From ba5258d7165423b360edf1747d0ffec00052db13 Mon Sep 17 00:00:00 2001 From: baehyunsol <47506131+baehyunsol@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:21:52 +0900 Subject: [PATCH] remove unnecessary rows in `into datetime --list` (#8243) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Below is the result of `into datetime --list | uniq -d`. ``` ╭───┬───────────────┬─────────┬───────────────────────────────────────╮ │ # │ Specification │ Example │ Description │ ├───┼───────────────┼─────────┼───────────────────────────────────────┤ │ 0 │ %Y │ 2023 │ The full proleptic Gregorian year, │ │ │ │ │ zero-padded to 4 digits. │ │ 1 │ %C │ 20 │ The proleptic Gregorian year divided │ │ │ │ │ by 100, zero-padded to 2 digits. │ ╰───┴───────────────┴─────────┴───────────────────────────────────────╯ ``` It's supposed to be an empty table, but it has two rows. I removed the duplicates. # User-Facing Changes `into datetime --list` will print out a correct table. --- crates/nu-command/src/date/format.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/crates/nu-command/src/date/format.rs b/crates/nu-command/src/date/format.rs index 1f5a293668..af862aef27 100644 --- a/crates/nu-command/src/date/format.rs +++ b/crates/nu-command/src/date/format.rs @@ -198,14 +198,6 @@ pub(crate) fn generate_strftime_list(head: Span, show_parse_only_formats: bool) } let specifications = vec![ - FormatSpecification { - spec: "%Y", - description: "The full proleptic Gregorian year, zero-padded to 4 digits.", - }, - FormatSpecification { - spec: "%C", - description: "The proleptic Gregorian year divided by 100, zero-padded to 2 digits.", - }, FormatSpecification { spec: "%Y", description: "The full proleptic Gregorian year, zero-padded to 4 digits.",