Last active
April 4, 2020 20:52
-
-
Save mjyc/b33ea80309161328716e59f665dc595f to your computer and use it in GitHub Desktop.
Search & edit git-issue in terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim $(grep -lR "$(sk --ansi -i -c 'grep -lER "{}" .issues/issues/ | grep -v tags | grep -v comments | xargs head -q -n 1')" .issues/issues/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Support fuzzy matching text in comments and tags (e.g., labels) in addition to titles and descriptions of issues | |
vim $(grep -lR "$(sk --ansi -i -c 'grep -lER "{}" .issues/issues/ | xargs dirname | awk "{ print \$0 \"/description\" }" | uniq | xargs head -q -n 1')" .issues/issues/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fuzzy text search of issues and display preview on the right panel | |
sk --ansi -i -c 'grep -lER "{}" .issues/issues/ | xargs dirname | awk "{ print \$0 \"/description\" }" | uniq | xargs head -q -n 1' --preview "grep -lR {} .issues/issues | xargs cat" # improvement ideas - use find to only search "tag" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been enjoying @dspinellis's git-issue. The above commands are for searching and editing local issues created or imported via git-issue.
A quick walkthrough of
gise.sh
:grep
s local issues that contains text, which will be placed at"{}"
via skim, ignores tag and comment filenames, and returns the title (xargs head ...
)sk
)grep -lR "$(sk --ansi ...)" .issues/issues/
) and open it invim
(or your favorite editor)