Created
May 22, 2023 14:15
-
-
Save jasonmorganson/b1024d72777bf40a1452bfb5792c8525 to your computer and use it in GitHub Desktop.
Nushell Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open .default-cloud-sdk-components | lines | each { |component| gcloud components install $component } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | lines | split column "." name ext | par-each { |file| mv $"($file.name).($file.ext)" $"($file.name).txt" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open .env | lines | split column "=" name value | let-env name = value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | lines | wrap name | insert json { |file| try { open $file.name | from json } catch { |error| "error" } } | where json == "error" | insert error { |file| try { open $file.name | from json } catch { |error| $error }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment