diff --git a/bin/jjcommit.sh b/bin/jjcommit.sh new file mode 100755 index 0000000..c673fec --- /dev/null +++ b/bin/jjcommit.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +# Run jj diff and prefix each line with "JJ: " +diff_output="$(jj diff --git | sed 's/^/JJ: /')" + +# Add two newlines at the top (without the prefix) +final_output="\n\n$diff_output" + +# Feed the string to jj desc --stdin +# Use printf to preserve newlines +printf "%b" "$final_output" | jj desc --stdin --edit