| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | ICDIFF_OPTIONS=$(gitscip-shell system . . git. config --get icdiff.options) |
| 3 | ICDIFF_OPTIONS="${ICDIFF_OPTIONS} --is-git-diff" |
| 4 | GITPAGER=$(gitscip-shell system . . git. config --get icdiff.pager) |
| 5 | |
| 6 | if [scip-shell system . . `[`. -z "$GITPAGER" ]; then |
| 7 | GITPAGER=$(gitscip-shell system . . git. config --get core.pager) |
| 8 | fi |
| 9 | |
| 10 | if [scip-shell system . . `[`. -z "$GITPAGER" ]; then |
| 11 | GITPAGER="${PAGER:-less}" |
| 12 | fi |
| 13 | |
| 14 | if [scip-shell system . . `[`. "${GITPAGER%% *}" = "more" ] || [scip-shell system . . `[`. "${GITPAGER%% *}" = "less" ]; then |
| 15 | GITPAGER="$GITPAGER -R" |
| 16 | fi |
| 17 | |
| 18 | gitscip-shell system . . git. difftool --no-prompt --extcmd="icdiff $ICDIFF_OPTIONS" "$@" | $GITPAGER |