diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-14 17:39:51 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-14 17:39:51 +1200 |
commit | 30ace50e923b188ad60530bda64ab71272383625 (patch) | |
tree | 2fd931f119f77256e83aa81ccded9c33a4f39473 | |
parent | Merge branch 'release/v6.0.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-30ace50e923b188ad60530bda64ab71272383625.tar.gz dotfiles-30ace50e923b188ad60530bda64ab71272383625.zip |
Merge branch 'release/v6.1.0'v6.1.0
* release/v6.1.0:
Allow periods in sudo-ed filenames
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/autoload/filetype.vim | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v6.0.0 -Fri Jun 14 05:20:15 UTC 2019 +tejr dotfiles v6.1.0 +Fri Jun 14 05:39:51 UTC 2019 diff --git a/vim/autoload/filetype.vim b/vim/autoload/filetype.vim index 79df3b28..6a66d62e 100644 --- a/vim/autoload/filetype.vim +++ b/vim/autoload/filetype.vim @@ -44,13 +44,13 @@ function! filetype#SudoRepeat() abort let fn = expand('<afile>') " myfileXXQGS16A.conf: strip eight chars before final period - if fn =~# '/[^./]\+\w\{8}\.[^./]\+$' + if fn =~# '/[^/]\+\w\{8}\.[^./]\+$' let fr = expand('<afile>:r') let fe = expand('<afile>:e') let fn = strpart(fr, -8, strlen(fr)) . '.' . fe " myfile.XXQGS16A: strip extension - elseif fn =~# '/[^./]\+\.\w\{8}$' + elseif fn =~# '/[^/]\+\.\w\{8}$' let fn = expand('<afile>:r') " Unrecognised pattern; return, don't repeat |