diff --git a/Examples.md b/Examples.md index 798152a..59280d3 100644 --- a/Examples.md +++ b/Examples.md @@ -796,7 +796,18 @@ git rebase -i master --autosquash ![forgit-gi](https://raw.githubusercontent.com/wfxr/i/master/forgit-gi.png) +Watch GitHub actions for the current branch, with selection via fzf +```sh +# gh-watch -- watch the current actions +gh-watch() { + gh run list \ + --branch $(git rev-parse --abbrev-ref HEAD) \ + --json status,name,databaseId | + jq -r '.[] | select(.status != "completed") | (.databaseId | tostring) + "\t" + (.name)' | + fzf -1 -0 | awk '{print $1}' | xargs gh run watch +} +``` ### [jrnl](https://github.com/jrnl-org/jrnl)