Created
January 20, 2023 11:35
-
-
Save azu/e0cf3b7260c1be06dc161cdbeb94d6fc to your computer and use it in GitHub Desktop.
search GitHub Isssue and checkout for develop
This file contains hidden or 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
| function gh-issue-checkout(){ | |
| INITIAL_QUERY="$1" | |
| GH_ISSUE_LIST="gh issue list -S" | |
| FZF_DEFAULT_COMMAND="$GH_ISSUE_LIST '$INITIAL_QUERY'" \ | |
| gh issue list | \ | |
| fzf --layout=reverse \ | |
| --bind "change:reload:$GH_ISSUE_LIST {q} || true,ctrl-o:execute(echo {} | xargs gh issue view --web)+abort"\ | |
| --preview "gh issue view {1} | bat --color=always --style=grid --file-name O.md" \ | |
| --header 'Press Ctrl+O to open issue' \ | |
| | awk '{print $1}' | xargs -IXXX gh issue develop XXX --name "feature/XXX" --checkout | |
| } | |
| zle -N gh-issue-checkout | |
| bindkey '^B^I' gh-issue-checkout |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gh-issue-devlop.mp4