-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the feature or problem you’d like to solve
When running gh cs create interactively you need to enter the full repo name with owner manually. Other clients offer suggestions once the user starts typing by using the search API, gh could also do this.
Proposed solution
The underlying survey library offers a Suggest option which gives a callback to provide a list of options on tab (see below). This callback can hit the search API endpoint to retrieve suggestions to display to the user.
As an additional enhancement, gh could cache some recently used repos - either used with cs or really any repos the user interacts with - to include with (or use instead of) the search results.
Additional context
The example above hits /search/repositories?q=react+in:name. If the user enters a full owner name and partial repo name (e.g. facebook/re) we can instead hit /search/repositories?q=re+user:facebook+in:name which gives much better results from what I've seen. Additionally, searching with the full owner name also will return private repos which is useful.
