GitHub CLI to Search and Preview Pull Requests then Check Out

Published

August 25, 2022

Reading time
1 min read

📹 The above video builds the terminal command piece by piece using:

  • gh: GitHub CLI
  • fzf: command-line fuzzy finder
  • awk: text parsing tool
  • xargs: converts stdin into arguments

The final command from the video is…

GH_FORCE_TTY=100% gh pr list | fzf --ansi --preview 'GH_FORCE_TTY=100% gh pr view {1}' --preview-window down --header-lines 3 | awk '{print $1}' | xargs gh pr checkout
Web Mentions
0
0

Tweet about this post and have it show up here!