Move and correct defn
The salient difference is that it uses -x when testing.
This commit is contained in:
@@ -103,18 +103,6 @@ function custom_sniff() {
|
||||
fi
|
||||
}
|
||||
|
||||
function custom_formatter() {
|
||||
root="$1"
|
||||
file_type="$2"
|
||||
|
||||
maybe="$root/.would-reformat/$file_type"
|
||||
if [[ -f "$maybe" ]]; then
|
||||
echo "$maybe"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "use-default"
|
||||
}
|
||||
|
||||
## WOULD_FORMAT_PROJECT_ROOT=$(project_root $1)
|
||||
|
||||
@@ -165,6 +153,19 @@ function sniff_file_type() {
|
||||
echo $file_type
|
||||
}
|
||||
|
||||
function custom_formatter() {
|
||||
root="$1"
|
||||
file_type="$2"
|
||||
|
||||
maybe="$root/.would-reformat/$file_type"
|
||||
if [[ -x "$maybe" ]]; then
|
||||
echo -n "$maybe"
|
||||
return
|
||||
fi
|
||||
|
||||
echo ""
|
||||
}
|
||||
|
||||
function choose_wrapper() {
|
||||
file_type="$1"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user