You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wing project discover ~/code --register # this machine
226
+
</code></pre>
227
+
<p>One <code>find</code> per machine, run over ssh, all machines at once — a round trip per candidate directory
228
+
would take minutes. It looks for the markers that mean "a project is here" (<code>.git</code>, <code>Cargo.toml</code>,
229
+
<code>go.mod</code>, <code>*.nimble</code>, <code>pyproject.toml</code>, <code>v.mod</code>, <code>*.cabal</code>, <code>.make.lua</code> and the rest) and folds the
230
+
several markers a polyglot project has into one entry.</p>
231
+
<p>Without <code>--register</code> it prints what it found and keeps nothing, so a scan can be looked at before it
232
+
becomes registry entries. Registration merges rather than replaces: re-running discovery is how the
233
+
registry stays true, so it has to be safe to repeat, and a machine that is switched off does not
234
+
lose its projects.</p>
235
+
<h2id="getting-into-a-project"><aclass="header" href="#getting-into-a-project">Getting into a project</a></h2>
236
+
<pre><codeclass="language-sh">wing ssh api # a shell in the project, wherever it is
237
+
wing ssh lab:api # …on that machine specifically
238
+
wing ssh lab # just the machine
239
+
wing ssh lab:api -- 'git status'
240
+
wing ssh api --cd src # start somewhere else
241
+
wing where api # print the path (local) or the ssh command (remote)
242
+
</code></pre>
243
+
<p><code>wing ssh</code> takes a machine or a project. On a remote project it opens a login shell already inside
244
+
the directory — one lookup and one <code>cd</code>, and it is the same command whether the project turns out to
245
+
be here or three machines away. On a local project it is a shell in that directory.</p>
246
+
<p>A bare name is read as a machine first, since <code>wing ssh lab</code> reads as a machine; <code>--project</code> says
247
+
otherwise and <code>host:name</code> is never ambiguous.</p>
248
+
<p><code>wing where</code> prints instead of entering, which is what a shell function wants:</p>
249
+
<pre><codeclass="language-sh">cd "$(wing where api)" # for a local project
wing project discover ~/code --register # this machine
196
+
</code></pre>
197
+
<p>One <code>find</code> per machine, run over ssh, all machines at once — a round trip per candidate directory
198
+
would take minutes. It looks for the markers that mean "a project is here" (<code>.git</code>, <code>Cargo.toml</code>,
199
+
<code>go.mod</code>, <code>*.nimble</code>, <code>pyproject.toml</code>, <code>v.mod</code>, <code>*.cabal</code>, <code>.make.lua</code> and the rest) and folds the
200
+
several markers a polyglot project has into one entry.</p>
201
+
<p>Without <code>--register</code> it prints what it found and keeps nothing, so a scan can be looked at before it
202
+
becomes registry entries. Registration merges rather than replaces: re-running discovery is how the
203
+
registry stays true, so it has to be safe to repeat, and a machine that is switched off does not
204
+
lose its projects.</p>
205
+
<h2id="getting-into-a-project"><aclass="header" href="#getting-into-a-project">Getting into a project</a></h2>
206
+
<pre><codeclass="language-sh">wing ssh api # a shell in the project, wherever it is
207
+
wing ssh lab:api # …on that machine specifically
208
+
wing ssh lab # just the machine
209
+
wing ssh lab:api -- 'git status'
210
+
wing ssh api --cd src # start somewhere else
211
+
wing where api # print the path (local) or the ssh command (remote)
212
+
</code></pre>
213
+
<p><code>wing ssh</code> takes a machine or a project. On a remote project it opens a login shell already inside
214
+
the directory — one lookup and one <code>cd</code>, and it is the same command whether the project turns out to
215
+
be here or three machines away. On a local project it is a shell in that directory.</p>
216
+
<p>A bare name is read as a machine first, since <code>wing ssh lab</code> reads as a machine; <code>--project</code> says
217
+
otherwise and <code>host:name</code> is never ambiguous.</p>
218
+
<p><code>wing where</code> prints instead of entering, which is what a shell function wants:</p>
219
+
<pre><codeclass="language-sh">cd "$(wing where api)" # for a local project
0 commit comments