Skip to content

Instantly share code, notes, and snippets.

@amtoine
Created May 6, 2023 08:43
Show Gist options
  • Save amtoine/84ad5a5d760c91393d58c22c02c358b6 to your computer and use it in GitHub Desktop.
Save amtoine/84ad5a5d760c91393d58c22c02c358b6 to your computer and use it in GitHub Desktop.
auto update from HTTP file

auto update from HTTP file

def "http auto update" [
    target: string
    destination: path
    message: string
] {
    http get --raw $target | save --force $destination
    git add $destination
    git commit -m $message
}
http auto update https://raw.githubusercontent.com/nushell/vscode-nushell-lang/main/snippets/nushell.json snippets/nushell.json "update the nushell snippets"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment