···79git config jump.grepCmd "ag --column"
80--------------------------------------------------
81000000008283Related Programs
84----------------
···100-----------
101102This script was written and tested with vim. Given that the quickfix
103-format is the same as what gcc produces, I expect emacs users have a
104similar feature for iterating through the list, but I know nothing about
105how to activate it.
106
···79git config jump.grepCmd "ag --column"
80--------------------------------------------------
8182+You can use the optional argument '--stdout' to print the listing to
83+standard output instead of feeding it to the editor. You can use the
84+argument with M-x grep on Emacs:
85+86+--------------------------------------------------
87+# In Emacs, M-x grep and invoke "git jump --stdout <mode>"
88+M-x grep<RET>git jump --stdout diff<RET>
89+--------------------------------------------------
9091Related Programs
92----------------
···108-----------
109110This script was written and tested with vim. Given that the quickfix
111+format is the same as what gcc produces, I expect other tools have a
112similar feature for iterating through the list, but I know nothing about
113how to activate it.
114
+24-1
contrib/git-jump/git-jump
···23usage() {
4 cat <<\EOF
5-usage: git jump <mode> [<args>]
67Jump to interesting elements in an editor.
8The <mode> parameter is one of:
···15 configured, to the command in `jump.grepCmd`.
1617ws: elements are whitespace errors. Arguments are given to diff --check.
00018EOF
19}
20···64 git diff --check "$@"
65}
66000000000000000067if test $# -lt 1; then
68 usage >&2
69 exit 1
70fi
71mode=$1; shift
00007273trap 'rm -f "$tmp"' 0 1 2 3 15
74tmp=`mktemp -t git-jump.XXXXXX` || exit 1
···23usage() {
4 cat <<\EOF
5+usage: git jump [--stdout] <mode> [<args>]
67Jump to interesting elements in an editor.
8The <mode> parameter is one of:
···15 configured, to the command in `jump.grepCmd`.
1617ws: elements are whitespace errors. Arguments are given to diff --check.
18+19+If the optional argument `--stdout` is given, print the quickfix
20+lines to standard output instead of feeding it to the editor.
21EOF
22}
23···67 git diff --check "$@"
68}
6970+use_stdout=
71+while test $# -gt 0; do
72+ case "$1" in
73+ --stdout)
74+ use_stdout=t
75+ ;;
76+ --*)
77+ usage >&2
78+ exit 1
79+ ;;
80+ *)
81+ break
82+ ;;
83+ esac
84+ shift
85+done
86if test $# -lt 1; then
87 usage >&2
88 exit 1
89fi
90mode=$1; shift
91+if test "$use_stdout" = "t"; then
92+ "mode_$mode" "$@"
93+ exit 0
94+fi
9596trap 'rm -f "$tmp"' 0 1 2 3 15
97tmp=`mktemp -t git-jump.XXXXXX` || exit 1