logoalt Hacker News

__MatrixMan__06/25/20250 repliesview on HN

I love nushell. You can also query by friendlier things than index:

     history | where exit_status == 127 | last | get duration
    2sec 410ms
The syntax ends up very clean looking since the data going through the pipes is typed, and the error messages are top notch

      × Types 'duration' and 'int' are not compatible for the '-' operator.
       ╭─[entry #47:1:2]
     1 │ (history | where exit_status == 127 | last | get duration) - 10
       ·  ───┬───                                                   ┬ ─┬
       ·     │                                                      │  ╰── int
       ·     │                                                      ╰── does not operate between 'duration' and 'int'
       ·     ╰── duration
       ╰────
(fingers crossed hn doesn't mangle that...)