Last active
August 21, 2024 10:52
-
-
Save tdaron/f5d0985687d8aed06714c8901dfb5fcb to your computer and use it in GitHub Desktop.
revision picker for jj using fzf
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
function fzf_jj_edit | |
if test -d .jj | |
set -l name (jj log --no-graph -T 'change_id.shortest() ++ "\t" ++ description.first_line() ++ " " ++ branches.join(" ") ++ "\n"' --color always | fzf --ansi | cut -f1) | |
commandline -it "$name" | |
else | |
commandline -it "# not in a jj directory" | |
end | |
end | |
bind \cj 'fzf_jj_edit' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can just press Ctrl+j in the middle of a command to run it :)