forked from extern/nushell
f33b60c001
related to - https://discord.com/channels/601130461678272522/614593951969574961/1141009665266831470 # Description this PR - prints a colorful warning when a user uses either `--format` or `--list` on `into datetime` - does NOT remove the features for now, i.e. the two options still work - redirect to the `format date` command instead i propose to - land this now - prepare a removal PR right after this - land the removal PR in between 0.84 and 0.85 # User-Facing Changes `into datetime --format` and `into datetime --list` will be deprecated in 0.85. ## how it looks - `into datetime --list` in the REPL ```nushell > into datetime --list | first Error: × Deprecated option ╭─[entry #1:1:1] 1 │ into datetime --list | first · ──────┬────── · ╰── `into datetime --list` is deprecated and will be removed in 0.85 ╰──── help: see `format datetime --list` instead ╭───────────────┬────────────────────────────────────────────╮ │ Specification │ %Y │ │ Example │ 2023 │ │ Description │ The full proleptic Gregorian year, │ │ │ zero-padded to 4 digits. │ ╰───────────────┴────────────────────────────────────────────╯ ``` - `into datetime --list` in a script ```nushell > nu /tmp/foo.nu Error: × Deprecated option ╭─[/tmp/foo.nu:4:1] 4 │ # 5 │ into datetime --list | first · ──────┬────── · ╰── `into datetime --list` is deprecated and will be removed in 0.85 ╰──── help: see `format datetime --list` instead ╭───────────────┬────────────────────────────────────────────╮ │ Specification │ %Y │ │ Example │ 2023 │ │ Description │ The full proleptic Gregorian year, │ │ │ zero-padded to 4 digits. │ ╰───────────────┴────────────────────────────────────────────╯ ``` - `help into datetime` ![baz](https://github.com/nushell/nushell/assets/44101798/08beece0-9c89-4665-bfe4-76a32207470f) # Tests + Formatting # After Submitting |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE |