Message ID | 972d51888ba015a6697475025466432218efa6dd.1669187053.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 64685cb85566c1b0fb288690a300978d3c035431 |
Headers | show |
Series | git-jump: support Emacs | expand |
diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump index babb3b5c68d..cc97b0dcf02 100755 --- a/contrib/git-jump/git-jump +++ b/contrib/git-jump/git-jump @@ -88,6 +88,8 @@ if test $# -lt 1; then exit 1 fi mode=$1; shift +type "mode_$mode" >/dev/null 2>&1 || { usage >&2; exit 1; } + if test "$use_stdout" = "t"; then "mode_$mode" "$@" exit 0 @@ -95,7 +97,6 @@ fi trap 'rm -f "$tmp"' 0 1 2 3 15 tmp=`mktemp -t git-jump.XXXXXX` || exit 1 -type "mode_$mode" >/dev/null 2>&1 || { usage >&2; exit 1; } "mode_$mode" "$@" >"$tmp" test -s "$tmp" || exit 0 open_editor "$tmp"