-
Notifications
You must be signed in to change notification settings - Fork 8
add a download command #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Good idea, I will try it later, thanks |
Thanks for adding this feature, one more thing: it might not that helpful for the Windows users: λ $> tk get-latest-nightly-build
Please choose one architecture: |
aarch64-apple-darwin
aarch64-darwin-full
aarch64-linux-gnu-full
aarch64-pc-windows-msvc
aarch64-pc-windows-msvc
aarch64-unknown-linux-gnu
> aarch64-windows-msvc-full
aarch64-windows-msvc-full
armv7-unknown-linux-gnueabihf
riscv64gc-unknown-linux-gnu
x86_64-apple-darwin
x86_64-darwin-full
x86_64-linux-gnu-full
x86_64-linux-musl-full
x86_64-pc-windows-msvc
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
x86_64-windows-msvc-full
x86_64-windows-msvc-full as there are always two packages with the same name for each target, no matter which one I choose will get an error: Error: × unexpected_internal_error:
│ expected one match, found 2
│ matches: [{url: https://api.github.com/repos/nushell/nightly/releases/assets/130351362, id: 130351362, node_id:
│ RA_kwDOJuqqcM4HxQEC, name: nu-0.85.1-aarch64-pc-windows-msvc.msi, label: , uploader: {login: github-actions[bot], id:
│ 41898282, node_id: MDM6Qm90NDE4OTgyODI=, avatar_url: https://avatars.githubusercontent.com/in/15368?v=4, gravatar_id: ,
│ url: https://api.github.com/users/github-actions%5Bbot%5D, html_url: https://github.com/apps/github-actions,
│ followers_url: https://api.github.com/users/github-actions%5Bbot%5D/followers, following_url: https://api.github.com/
│ users/github-actions%5Bbot%5D/following{/other_user}, gists_url: https://api.github.com/users/github-actions%5Bbot%5D/
│ gists{/gist_id}, starred_url: https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo},
│ subscriptions_url: https://api.github.com/users/github-actions%5Bbot%5D/subscriptions, organizations_url: https://
│ api.github.com/users/github-actions%5Bbot%5D/orgs, repos_url: https://api.github.com/users/github-actions%5Bbot%5D/
│ repos, events_url: https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}, received_events_url: https://
│ api.github.com/users/github-actions%5Bbot%5D/received_events, type: Bot, site_admin: false}, content_type: application/
│ octet-stream, state: uploaded, size: 13238272, download_count: 0, created_at: 2023-10-13T01:50:02Z, updated_at: 2023-
│ 10-13T01:50:03Z, browser_download_url: https://github.com/nushell/nightly/releases/download/nightly-c925537/nu-
│ 0.85.1-aarch64-pc-windows-msvc.msi}, {url: https://api.github.com/repos/nushell/nightly/releases/assets/130351230,
│ id: 130351230, node_id: RA_kwDOJuqqcM4HxQB-, name: nu-0.85.1-aarch64-pc-windows-msvc.zip, label: , uploader: {login:
│ github-actions[bot], id: 41898282, node_id: MDM6Qm90NDE4OTgyODI=, avatar_url: https://avatars.githubusercontent.com/
│ in/15368?v=4, gravatar_id: , url: https://api.github.com/users/github-actions%5Bbot%5D, html_url: https://github.com/
│ apps/github-actions, followers_url: https://api.github.com/users/github-actions%5Bbot%5D/followers, following_url:
│ https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}, gists_url: https://api.github.com/
│ users/github-actions%5Bbot%5D/gists{/gist_id}, starred_url: https://api.github.com/users/github-actions%5Bbot%5D/
│ starred{/owner}{/repo}, subscriptions_url: https://api.github.com/users/github-actions%5Bbot%5D/subscriptions,
│ organizations_url: https://api.github.com/users/github-actions%5Bbot%5D/orgs, repos_url: https://api.github.com/users/
│ github-actions%5Bbot%5D/repos, events_url: https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy},
│ received_events_url: https://api.github.com/users/github-actions%5Bbot%5D/received_events, type: Bot, site_admin:
│ false}, content_type: application/zip, state: uploaded, size: 16752897, download_count: 0, created_at: 2023-10-
│ 13T01:48:24Z, updated_at: 2023-10-13T01:48:26Z, browser_download_url: https://github.com/nushell/nightly/releases/
│ download/nightly-c925537/nu-0.85.1-aarch64-pc-windows-msvc.zip}] Can we simplify the |
@hustcer for the windows bug, i have no idea how to fix it and cannot test it 😢 |
Issue #12289, can be closed when this is merged # Description Currently, the ``into datetime`` command's signature indicates that it supports input as record, but it was actually not supported. This PR implements this feature. # User-Facing Changes ``into datetime``'s signature changed (see comments) **Happy paths** Note: I'm in +02:00 timezone. ```nushell > date now | into record | into datetime Fri, 4 Apr 2025 18:32:34 +0200 (now) > {year: 2025, month: 12, day: 6, second: 59} | into datetime | into record ╭─────────────┬────────╮ │ year │ 2025 │ │ month │ 12 │ │ day │ 6 │ │ hour │ 0 │ │ minute │ 0 │ │ second │ 59 │ │ millisecond │ 0 │ │ microsecond │ 0 │ │ nanosecond │ 0 │ │ timezone │ +02:00 │ ╰─────────────┴────────╯ > {day: 6, second: 59, timezone: '-06:00'} | into datetime | into record ╭─────────────┬────────╮ │ year │ 2025 │ │ month │ 4 │ │ day │ 6 │ │ hour │ 0 │ │ minute │ 0 │ │ second │ 59 │ │ millisecond │ 0 │ │ microsecond │ 0 │ │ nanosecond │ 0 │ │ timezone │ -06:00 │ ╰─────────────┴────────╯ ``` **Edge cases** ```nushell {} | into datetime Fri, 4 Apr 2025 18:35:19 +0200 (now) ``` **Error paths** - A key has a wrong type ```nushell > {month: 12, year: '2023'} | into datetime Error: nu::shell::only_supports_this_input_type × Input type not supported. ╭─[entry #8:1:19] 1 │ {month: 12, year: '2023'} | into datetime · ───┬── ──────┬────── · │ ╰── only int input data is supported · ╰── input type: string ╰──── ``` ```nushell > {month: 12, year: 2023, timezone: 100} | into datetime Error: nu:🐚:only_supports_this_input_type × Input type not supported. ╭─[entry #10:1:35] 1 │ {month: 12, year: 2023, timezone: 100} | into datetime · ─┬─ ──────┬────── · │ ╰── only string input data is supported · ╰── input type: int ╰──── ``` - Key has the right type but value invalid (e.g. month=13, or day=0) ```nushell > {month: 13, year: 2023} | into datetime Error: nu:🐚:incorrect_value × Incorrect value. ╭─[entry #9:1:1] 1 │ {month: 13, year: 2023} | into datetime · ───────────┬─────────── ──────┬────── · │ ╰── one of more values are incorrect and do not represent valid date · ╰── encountered here ╰──── ``` ```nushell > {hour: 1, minute: 1, second: 70} | into datetime Error: nu:🐚:incorrect_value × Incorrect value. ╭─[entry #3:1:1] 1 │ {hour: 1, minute: 1, second: 70} | into datetime · ────────────────┬─────────────── ──────┬────── · │ ╰── one of more values are incorrect and do not represent valid time · ╰── encountered here ╰──── ``` - Timezone has right type but is invalid ```nushell > {month: 12, year: 2023, timezone: "+100:00"} | into datetime Error: nu:🐚:incorrect_value × Incorrect value. ╭─[entry #11:1:35] 1 │ {month: 12, year: 2023, timezone: "+100:00"} | into datetime · ────┬──── ──────┬────── · │ ╰── encountered here · ╰── invalid timezone ╰──── ``` - Record contains an invalid key ```nushell > {month: 12, year: 2023, unknown: 1} | into datetime Error: nu:🐚:unsupported_input × Unsupported input ╭─[entry #12:1:1] 1 │ {month: 12, year: 2023, unknown: 1} | into datetime · ─────────────────┬───────────────── ──────┬────── · │ ╰── Column 'unknown' is not valid for a structured datetime. Allowed columns are: year, month, day, hour, minute, second, millisecond, microsecond, nanosecond, timezone · ╰── value originates from here ╰──── ``` - If several issues are present, the user can get the error msg for only one, though ```nushell > {month: 20, year: '2023'} | into datetime Error: nu:🐚:only_supports_this_input_type × Input type not supported. ╭─[entry #7:1:19] 1 │ {month: 20, year: '2023'} | into datetime · ───┬── ──────┬────── · │ ╰── only int input data is supported · ╰── input type: string ╰ ``` # Tests + Formatting Tests added Fmt + clippy OK # After Submitting Maybe indicate that in the release notes I added an example in the command, so the documentation will be automatically updated.
related to
description
i was playing with the nightly builds of Nushell in nushell/nupm#29 and wrote a little script to download the latest build automatically 😋
i think the easiest is to read the new section in the README 😉