File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 44# Distributed under the MIT license.
55# http://www.opensource.org/licenses/mit-license.php
66
7- if (( $# != 1 )) ; then
8- echo " usage: $0 file.clj"
7+ abort_with_help () {
8+ echo " usage: $( basename " $0 " ) [-p PREFIX] file.clj"
99 exit 1
10- fi
10+ }
11+
12+ PREFIX=' report'
13+
14+ while getopts :p: opt; do
15+ case " $opt " in
16+ p) PREFIX=" $OPTARG " ;;
17+ h) abort_with_help;;
18+ esac
19+ done
20+ shift $(( OPTIND- 1 ))
21+
22+ (( $# == 1 )) || abort_with_help
1123
1224VIMRC="
1325set runtimepath^=$( dirname " $0 " ) /../..
@@ -17,6 +29,6 @@ syntime on
1729"
1830
1931exec vim -N -u <( echo " $VIMRC " ) \
20- -c ' execute " redir > " . strftime("report-%Y-%m-%d-%H-%M-%S .log") ' \
32+ -c " execute ' redir > ' . strftime(' ${PREFIX} - $( date +%s.%N ) .log') " \
2133 -c ' call feedkeys(repeat("j", line("$")-1) . ":silent syntime report | quit\<CR>")' \
2234 " $1 "
You can’t perform that action at this time.
0 commit comments