aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-09 01:36:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-09 01:36:19 +1200
commit6c794aabdaa5829742fc55df8a65b642d9bb11f2 (patch)
tree65de06c9e132301004c2705c9706ffe047617f22 /vim/vimrc
parentIdentify patch number of fixed feature (diff)
downloaddotfiles-6c794aabdaa5829742fc55df8a65b642d9bb11f2.tar.gz
dotfiles-6c794aabdaa5829742fc55df8a65b642d9bb11f2.zip
Block MYVIM with pipes in its name
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc7
1 files changed, 5 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 96a7c593..a96503b4 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -89,8 +89,11 @@ endif
"
" So, if there's a comma, we just raise an error and end the script.
"
-if stridx($MYVIM, ',') != -1
- echoerr '$MYVIM contains a comma, refusing to proceed'
+" Similarly, the 'thesaurus' option, and possibly others, won't accept a path
+" with a pipe in its name, so don't allow that, either.
+"
+if $MYVIM =~# '[,|]'
+ echoerr 'Illegal characters in $MYVIM path'
finish
endif