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
{{ message }}
Repository navigation
gh gist edit: use prefix matching for gist id #7000
Describe the feature or problem you’d like to solve
Currently, gh gist edit command requires the user to put in the full Gist ID. I'd like to put in only the first few characters from the gist ID.
Proposed solution
Select the gist with the longest-matching prefix. If no gist matched, display gist not found as usual.
If there are 2 or more gists with the same prefix, display a selector.
vscode ➜ /workspaces/cli (trunk) $ gh gist edit 0c909
Editing gist 0c9097af4101ce6d43615d01e66dbbfa
? Edit which file? [Use arrows to move, type to filter]
> Makefile
README.md
btree.go
btree_test.go
vscode ➜ /workspaces/cli (trunk) $ gh gist edit 0c909
There are multiple gist matching '0c909'. Which one do you want to edit?> 0c9097af4101ce6d43615d01e66dbbfa
0c9098122c98006d2fd5b9f9eb5c5ac3
Though maybe the 'official' implementation could include caching / local filtering / similar maybe, so we're not having to hit the API with a high --limit all the time?
Activity
kousikmitra commentedon May 6, 2023
@vilmibI can we use something similar to existing
gh gist viewwhich shows a picker to pick from a list in case no gist id provided?vilmibm commentedon May 16, 2023
I'm in favor of
gh gist editmatchinggh gist viewin that regard, yeah.dardo82 commentedon May 30, 2023
Could we do the same thing matching the description?
kousikmitra commentedon May 31, 2023
Great, I will raise a PR once I get sometime to work on this.
0xdevalias commentedon Sep 15, 2025
This might be useful as a semi-partial workaround (or inspiration towards one) in the meantime: