-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.sh
executable file
·27 lines (23 loc) · 987 Bytes
/
help.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# checking for files
is_tracked () { git ls-files "$1" --error-unmatch >> /dev/null 2>&1; }
# is_tracked FILE && echo TRACKED || echo UNTRACKED
# echo "Diffing '_CoqProject' and actual .v files..."
(diff <(find * -name "*.v" | sort) <(cat _CoqProject | grep "\.v" | sort) \
| grep '^[<>]' \
| sed 's/^< \(.*\)$/\1: is not in _CoqProject (add to _CoqProject?)/' \
| sed 's/^> \(.*\)$/\1: unfound but in (remove from _CoqProject?)/'
) \
| tee >(wc -l | grep '^0$' | sed 's/^0$/"_CoqProject" appears to be configured correctly./') \
| grep --color -E "^.*\.v|$"
# coqide configuration
rc="$HOME/.config/coq/coqiderc"
[ -f "$rc" ] && \
((grep "project_file_name = ._CoqProject." $rc && \
grep "project_options = .appended to arguments." $rc) || \
(echo "
To make coqide handle loadpath correctly:
- open coqide, go to Edit > Preferences > Project
- change default name to '_CoqProject'
- choose option 'appended to arguments'
")) | grep -v "="