aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/awk.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin/awk.vim')
-rw-r--r--runtime/ftplugin/awk.vim11
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim
index 1bca3ad3cf..40fe304cf4 100644
--- a/runtime/ftplugin/awk.vim
+++ b/runtime/ftplugin/awk.vim
@@ -37,11 +37,14 @@ if exists("g:awk_is_gawk")
let b:undo_ftplugin .= " | setl fp<"
endif
- let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
- let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
- let path = substitute(path, ':', ',', 'g')
+ " Disabled by default for security reasons.
+ if dist#vim#IsSafeExecutable('awk', 'gawk')
+ let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
+ let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
+ let path = substitute(path, ':', ',', 'g')
- let &l:path = path
+ let &l:path = path
+ endif
let b:undo_ftplugin .= " | setl inc< path<"
endif