Skip to content

Instantly share code, notes, and snippets.

@paul-d-ray
Last active December 17, 2025 01:42
Show Gist options
  • Select an option

  • Save paul-d-ray/40781693556044d7987d9c0e460f5220 to your computer and use it in GitHub Desktop.

Select an option

Save paul-d-ray/40781693556044d7987d9c0e460f5220 to your computer and use it in GitHub Desktop.
Nushell Last vs Last 1

Nushell's Last vs Last 1 Command

In Nushell, there is a difference between "last" and "last 1"

  • the "last" command returns a string

  • the "last 1" command returns a list of strings

  • the same is true for "first" and "first 1" except the "first 1" is a list of strings (stream)

Nushell Examples

  • Last
 nuls -f D:\work\UniGetUI | last | get fullname

Output

d:\work\unigetui\prhome7 installed packages 2025-12-12 13-27-43.ubundle
  • Last 1
    nuls -f D:\work\UniGetUI | last 1 | get fullname
    Output
    ╭───┬─────────────────────────────────────────────────────────────────────────╮
    │ 0 │ d:\work\unigetui\prhome7 installed packages 2025-12-12 13-27-43.ubundle │
    ╰───┴─────────────────────────────────────────────────────────────────────────╯
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment