diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-11-29 16:07:49 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-11-29 16:07:49 +1300 |
commit | 1c92506c016e3e9cd9a4bc2aa98b44307edfa82c (patch) | |
tree | 1c2f14971956a05c212c02d02564c83c6f509b2b | |
parent | Merge branch 'release/v7.21.0' (diff) | |
parent | Update dotfiles(7) manual page (diff) | |
download | dotfiles-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-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rwxr-xr-x | bin/phpcsff.mi5 | 15 | ||||
-rw-r--r-- | man/man7/dotfiles.7df | 4 |
6 files changed, 31 insertions, 2 deletions
@@ -85,6 +85,9 @@ /bin/pa /bin/paz /bin/ped +/bin/phpcsff +/bin/phpcsff.m4 +/bin/phpcsff.sh /bin/pit /bin/plmu /bin/pp @@ -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 @@ -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. @@ -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 |