|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +abort_with_help() { |
| 4 | + echo "usage: $(basename "0ドル") [-p PREFIX] file.clj" |
| 5 | + exit 1 |
| 6 | +} |
| 7 | + |
| 8 | +PREFIX='report_indent' |
| 9 | + |
| 10 | +while getopts :p: opt; do |
| 11 | + case "$opt" in |
| 12 | + p) PREFIX="$OPTARG";; |
| 13 | + h) abort_with_help;; |
| 14 | + esac |
| 15 | +done |
| 16 | +shift $((OPTIND-1)) |
| 17 | + |
| 18 | +(($# == 1)) || abort_with_help |
| 19 | + |
| 20 | +VIMRC=" |
| 21 | +set runtimepath^=$(dirname "0ドル")/../.. |
| 22 | +filetype plugin indent on |
| 23 | +syntax on |
| 24 | +profile start $(echo "${PREFIX}-$(date +%s.%N).log") |
| 25 | +profile! file $(dirname "0ドル")/../../syntax/clojure.vim |
| 26 | +profile! file $(dirname "0ドル")/../../indent/clojure.vim |
| 27 | +" |
| 28 | + |
| 29 | +exec vim -N -u <(echo "$VIMRC") \ |
| 30 | + -c 'call feedkeys("gg=G")' \ |
| 31 | + -c 'call feedkeys(":silent quitall!\<CR>")' \ |
| 32 | + "1ドル" |
0 commit comments