Skip to content

Instantly share code, notes, and snippets.

@jdelStrother
Last active November 27, 2025 15:12
Show Gist options
  • Select an option

  • Save jdelStrother/17fb81151c736eb8e13c3b1ae5fc8310 to your computer and use it in GitHub Desktop.

Select an option

Save jdelStrother/17fb81151c736eb8e13c3b1ae5fc8310 to your computer and use it in GitHub Desktop.
function __fzf_jj_ref
set template 'format_short_change_id_with_hidden_and_divergent_info(self) ++ " " ++ format_short_signature_oneline(self.author()) ++ " "++ self.description().first_line() ++ "\0" ++ commit_id'
set refs (jj log --color=always -T $template | fzf --with-nth 1 --accept-nth 2 --delimiter '\0' \
--height 50% --tmux 90%,70% \
--layout reverse --multi --min-height 20+ \
--preview-window 'right,50%' \
--bind 'ctrl-/:change-preview-window(down,50%|hidden|)' --ansi \
--no-hscroll --preview "jj show --color=always {2}")
if test $status -eq 0
commandline --insert (string join ' ' $refs)
end
commandline --function repaint
end
bind \cg __fzf_jj_ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment