|
ls | columns
ls | columns | select 1
Getting values
ls | get name
Filtering
ls | where size > 2kb
ls | get name
ls | select name
open package.json
open package.json | get scripts
open people.txt
Get lines as strings
open people.txt | lines
Split lines at separator
open people.txt | lines | split column "|"
Get rid of white space
open people.txt | lines | split column "|" | str trim
open people.txt | lines | split column "|" | str trim | get column1
Renaming columns
open people.txt | lines | split column "|" fname lname job| str trim
Sort by a column
open people.txt | lines | split column "|" fname lname job| str trim | sort-by fname
http get https://blog.rust-lang.org/feed.xml
Confused? Look at the raw source
http get https://blog.rust-lang.org/feed.xml --raw | less
http get https://api.github.com/repos/nushell/nushell
Where are the issues?
http get https://api.github.com/repos/nushell/nushell | get issues_url
Let's look at an issue
http get https://api.github.com/repos/nushell/nushell/issues/10740
Got labels?
http get https://api.github.com/repos/nushell/nushell/issues/10740 | get labels.name