Blog/2024-02-23/fzf: Revision history

From Rest of What I Know

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

16 April 2024

23 February 2024

  • curprev 20:0220:02, 23 February 2024Roshan talk contribs 1,199 bytes +1,199 Created page with "<syntaxhighlight inline>fzf</syntaxhighlight> is a fuzzy-finder on the terminal. I use it for all sorts of stuff. Selecting a git branch: <syntaxhighlight lang=zsh> gco() { branch="$(git branch | grep -v '^\+' | fzf | tr -d '[:space:]' | sed 's/^\*//')" if -z "$branch" ; then echo "No branch selected" return 1 fi git checkout "$branch" } </syntaxhighlight> File:20240223-fzf-branch-switching.gif|thumb|alt=A GIF of the script above in use, selectin..."