Skip to content

Is there a way to use $EDITOR as the merge-tools program? #6548

Answered by yuja
heygarrett asked this question in Q&A
Discussion options

You must be logged in to vote

As ilyagr suggested, you'll need to use sh to expand $EDITOR environment variable. Something like this might also work (see jj util exec --help for the trick):

program = 'sh'
merge-args = ['-c', 'exec $EDITOR "$@"', '--', ...]

I don't think we'll want to add support for environment variables expansion at arbitrary places. Even if we had that, program = "$EDITOR" wouldn't work if $EDITOR had command name and arguments inline.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@heygarrett
Comment options

@yuja
Comment options

yuja May 16, 2025
Maintainer

Answer selected by heygarrett
@heygarrett
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants