aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-11-29 16:07:49 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-11-29 16:07:49 +1300
commit1c92506c016e3e9cd9a4bc2aa98b44307edfa82c (patch)
tree1c2f14971956a05c212c02d02564c83c6f509b2b
parentMerge branch 'release/v7.21.0' (diff)
parentUpdate dotfiles(7) manual page (diff)
downloaddotfiles-1c92506c016e3e9cd9a4bc2aa98b44307edfa82c.tar.gz
dotfiles-1c92506c016e3e9cd9a4bc2aa98b44307edfa82c.zip
Merge branch 'release/v7.22.0'v7.22.0
* release/v7.22.0: Update dotfiles(7) manual page Add phpcsff(1df)
-rw-r--r--.gitignore3
-rw-r--r--Makefile4
-rw-r--r--README.md3
-rw-r--r--VERSION4
-rwxr-xr-xbin/phpcsff.mi515
-rw-r--r--man/man7/dotfiles.7df4
6 files changed, 31 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index a6b9e0e3..8dbb1aba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -85,6 +85,9 @@
/bin/pa
/bin/paz
/bin/ped
+/bin/phpcsff
+/bin/phpcsff.m4
+/bin/phpcsff.sh
/bin/pit
/bin/plmu
/bin/pp
diff --git a/Makefile b/Makefile
index 6902c146..814cd41a 100644
--- a/Makefile
+++ b/Makefile
@@ -170,6 +170,7 @@ BINS = bin/ap \
bin/pa \
bin/paz \
bin/ped \
+ bin/phpcsff \
bin/pit \
bin/plmu \
bin/p \
@@ -234,6 +235,7 @@ BINS_M4 = bin/chn.m4 \
bin/edda.m4 \
bin/mim.m4 \
bin/oii.m4 \
+ bin/phpcsff.m4 \
bin/pst.m4 \
bin/swr.m4 \
bin/tlcs.m4 \
@@ -245,6 +247,7 @@ BINS_SH = bin/chn.sh \
bin/edda.sh \
bin/mim.sh \
bin/oii.sh \
+ bin/phpcsff.sh \
bin/pst.sh \
bin/swr.sh \
bin/tlcs.sh \
@@ -319,6 +322,7 @@ bin/dfv.sh: bin/dfv.m4 include/mktd.m4
bin/edda.sh: bin/edda.m4 include/mktd.m4
bin/mim.sh: bin/mim.m4 include/mktd.m4
bin/oii.sh: bin/oii.m4 include/mktd.m4
+bin/phpcsff.sh: bin/phpcsff.m4 include/mktd.m4
bin/pst.sh: bin/pst.m4 include/mktd.m4
bin/swr.sh: bin/swr.m4 include/mktd.m4
bin/tlcs.sh: bin/tlcs.m4 include/mktd.m4
diff --git a/README.md b/README.md
index 6c53c211..074b08b1 100644
--- a/README.md
+++ b/README.md
@@ -550,6 +550,9 @@ Installed by the `install-bin` target:
* `p(1df)` prints concatenated standard input; `cat(1)` as it should always
have been.
* `pa(1df)` prints its arguments, one per line.
+* `phpcsff(1df)` wraps around
+ [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to make it
+ a source code filter suitable for use as an `equalprg` in Vim.
* `pp(1df)` prints the full path of each argument using `$PWD`.
* `pph(1df)` runs `pp(1df)` and includes a leading `$HOSTNAME:`.
* `paz(1df)` print its arguments terminated by NULL chars.
diff --git a/VERSION b/VERSION
index a067e01f..6a0cbc58 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v7.21.0
-Thu, 28 Nov 2019 02:19:10 +0000
+tejr dotfiles v7.22.0
+Fri, 29 Nov 2019 03:07:47 +0000
diff --git a/bin/phpcsff.mi5 b/bin/phpcsff.mi5
new file mode 100755
index 00000000..ea05eaaa
--- /dev/null
+++ b/bin/phpcsff.mi5
@@ -0,0 +1,15 @@
+# Use php-cs-fixer as a source filter.
+self=phpcsff
+
+<%
+include(`include/mktd.m4')
+%>
+
+# Duplicate stdin into a file
+if ! command -v php-cs-fixer >/dev/null 2>&1 ; then
+ printf >&2 'php-cs-fixer: command not found\n'
+ exit 1
+fi
+cat -- "${@:--}" > "$td"/src.php
+php-cs-fixer fix -- "$td"/src.php
+cat -- "$td"/src.php
diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df
index abd75951..7d5a65db 100644
--- a/man/man7/dotfiles.7df
+++ b/man/man7/dotfiles.7df
@@ -862,6 +862,10 @@ it should always have been.
.IP \[bu] 2
\f[C]pa(1df)\f[] prints its arguments, one per line.
.IP \[bu] 2
+\f[C]phpcsff(1df)\f[] wraps around
+PHP\-CS\-Fixer (https://github.com/FriendsOfPHP/PHP-CS-Fixer) to make it
+a source code filter suitable for use as an \f[C]equalprg\f[] in Vim.
+.IP \[bu] 2
\f[C]pp(1df)\f[] prints the full path of each argument using
\f[C]$PWD\f[].
.IP \[bu] 2