Skip to content

Commit

Permalink
jj-fzf: unset FZF_DEFAULT_COMMAND in subshells
Browse files Browse the repository at this point in the history
Avoid forcing our FZF_DEFAULT_COMMAND (jj log) onto fzf
executions in subshells.

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik committed Dec 17, 2024
1 parent e8445fe commit cf65fa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jj-fzf
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ JJROOT=$(jj --ignore-working-copy root) || die "$PWD: not a JJ repository"
JJFZFSHOW="jj --no-pager --ignore-working-copy ${JJFZF_ATOP:+--at-op $JJFZF_ATOP} show --tool true"
JJFZFONELINE="jj --no-pager --ignore-working-copy log --color=always --no-graph -T builtin_log_oneline"
JJFZFPAGER="less -Rc"
JJSUBSHELL='T=$(tty 2>/dev/null||tty <&1 2>/dev/null||tty <&2 2>/dev/null)&&test -n "$T"&&echo -e "\n#\n# Type \"exit\" to leave subshell\n#" && exec /usr/bin/env '"$SHELL"' <$T 1>$T 2>$T'
JJSUBSHELL='T=$(tty 2>/dev/null||tty <&1 2>/dev/null||tty <&2 2>/dev/null)&&test -n "$T"&&echo -e "\n#\n# Type \"exit\" to leave subshell\n#" && unset FZF_DEFAULT_COMMAND && exec /usr/bin/env '"$SHELL"' <$T 1>$T 2>$T'
INFO_BINDING=" fzf </dev/null >/dev/tty 2>&1 --prompt ' ' --disabled --layout=reverse --height 1 --margin 4 --padding 4 --border=block --no-info --no-scrollbar --no-clear --bind=enter:print-query "
FUNCTIONS=()
FZFSETTINGS=(
Expand Down

0 comments on commit cf65fa8

Please sign in to comment.