Skip to content

Commit b55bf82

Browse files
committed
+Mᐁ includes
1 parent 7384e5b commit b55bf82

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/go/readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ With an empty history, or when stdin is redirected / non-interactive (CI, pipes)
5151
Local paths that no longer exist are dropped from the picker; remote refs stay listed
5252
even when their download bundle is gone (the next run re-downloads as usual).
5353

54+
Gists are labeled like GitHub’s UI as `owner/filename` (for example `kzu/run.cs`)
55+
instead of the full host URL. When two or more history entries share the same
56+
owner and file name, the picker switches to a short ref form with the first
57+
seven characters of the gist id: `owner/shortsha:file` (for example
58+
`kzu/0ac826d:run.cs`).
59+
5460
```console
5561
# Interactive: pick a previous run, then optional args
5662
dnx go
@@ -108,9 +114,15 @@ dnx go -- kzu/sandbox@v1.2.3:src/hello.cs
108114
# Full host (GitHub, Gist, GitLab, Azure DevOps)
109115
dnx go -- github.com/kzu/sandbox@main:hello.cs
110116
dnx go -- gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381
117+
# Multi-file gist: pick a specific entry file with :path (same as repos)
118+
dnx go -- gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381:run.cs
111119
dnx go -- gitlab.com/kzu/runcs/-/blob/main/program.cs
112120
```
113121

122+
Without `:path`, a gist (or repo) defaults to `program.cs` when present, otherwise
123+
the first top-level `.cs` file. Use `:filename.cs` when a multi-file gist should
124+
run a different entry point.
125+
114126
The first argument is resolved by first checking if it is a local file (`File.Exists`).
115127
If not, it falls back to parsing it as a remote ref (`owner/repo[@ref][:path]`).
116128

0 commit comments

Comments
 (0)