/usr/share/elvis/scripts/augz.ex is in elvis-common 2.2.0-11.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | " This file contains a set of autocmds which allow elvis to read & write
" files that are compressed via gzip.
augroup gzip
au!
au BufReadPre,FileReadPre *.gz set reol=binary
au BufReadPost *.gz %!gunzip
au FileReadPost *.gz '[,']!gunzip 2>/dev/null
au BufReadPost,FileReadPost *.gz {
set reol=text nomodified
file! (basename(filename))
source! (elvispath("elvis.arf"))
file! (filename).gz
set edited
}
au BufReadPost *.gz eval doau BufReadPost (basename(filename))
au BufWritePost,FileWritePost *.gz eval mv (afile) (basename(afile))
au BufWritePost,FileWritePost *.gz eval !gzip (basename(afile))
au FileAppendPre *.gz eval !gunzip (afile)
au FileAppendPre *.gz eval !mv (basename(afile)) (afile)
au FileAppendPost *.gz eval !mv (afile) (basename(afile))
au FileAppendPost *.gz eval !gzip (basename(afile))
augroup END
|