exercism / exercism/cli

nextercism: Consider a --remote flag for open

オープン
#460 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
1.4k
フォーク
363
平均マージ
6日 13時間
マージ済み PR(30日)
2

説明

Open has some nice functionality that lets you specify just the name of an exercise, and it will find all the possible matches that you have locally, and ask which one you want to open.

Many people work on multiple computers, or might not have all their Exercism work downloaded to their computer, which means that they might actually want to open something that they don't have locally.

In this case, it would be nice to provide a `--remote` flag which would ask the API what potential exercises we are talking about.

This will require defining in detail what the API needs to return and how the CLI will display this.

My gut feeling is that it should display the list exactly as though it were local ones.

```
We found more than one. Which one did you mean?
Type the number of the one you want to select it.

[1] python/clock
[2] go/clock
[3] ruby/clock
[4] elixir/clock
[5] haskell/clock

>
```

When implementing this, go ahead and write a test with a test server to fake out the API, until you get it the way you want it. A good starting point is probably:

```
{
"solutions": [{
"id": "abc-123",
"url": "https://v2.exercism.io/my/solutions/abc-123",
"track": {
"track": "cpp",
"language": "C++"
},
"exercise": {
"id": "clock"
}
}]
}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。