Repository navigation
gh gist edit: use prefix matching for gist id #7000
Description
Activity
- addedneeds-designAn engineering task needs design to proceedAn engineering task needs design to proceedand removedneeds-triageneeds to be reviewedneeds to be reviewed
on Feb 27, 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?can we use something similar to existing gh gist view which shows a picker to pick from a list in case no gist id provided?
I'm in favor of
gh gist editmatchinggh gist viewin that regard, yeah.Could we do the same thing matching the description?
can we use something similar to existing gh gist view which shows a picker to pick from a list in case no gist id provided?
I'm in favor of
gh gist editmatchinggh gist viewin that regard, yeah.Great, I will raise a PR once I get sometime to work on this.
- addedgh-gistrelating to the gh gist commandrelating to the gh gist command
on Oct 3, 2023 This might be useful as a semi-partial workaround (or inspiration towards one) in the meantime:
This workaround command using
fzffrom another tangentially related thread is actually quite useful here:workaround:
alias gist='gh gist edit $(gh gist list | fzf --reverse | awk "{print \$1}")'
Originally posted by @hholst80 in #2471 (comment)
And because it uses
gh gist list, it means we could also pass in extra args like--limit,--filter,--public,--secret, etc. eg:gist-edit() { local search="$1" gh gist edit "$( gh gist list --filter "$search" --limit 100 | fzf --reverse | awk '{print $1}' )" }
Though maybe the 'official' implementation could include caching / local filtering / similar maybe, so we're not having to hit the API with a high
--limitall the time?Originally posted by @0xdevalias in #11738
Describe the feature or problem you’d like to solve
Currently,
gh gist editcommand 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
gist not foundas usual.