xaizek / dotvim (License: Unspecified) (since 2018-12-07)
Vim configuration and plugins.
Commit 11295bec65e386e006e9e763f14c0556e4fba53e

Don't use system() to read a file in ifdef plugin
Author: xaizek
Author date (UTC): 2023-03-18 18:45
Committer name: xaizek
Committer date (UTC): 2023-03-18 18:45
Parent(s): d35c3347c5672eb229c3950a5699a3caa382133a
Signing key: 99DC5E4DB05F6BE2
Tree: 1d028bd77f672032daeecfb8a9063ad774f4852d
File Lines added Lines deleted
pack/other/start/ifdef/after/syntax/ifdef.vim 1 6
File pack/other/start/ifdef/after/syntax/ifdef.vim changed (mode: 100644) (index 782b74d..0dc1837)
... ... endfun
306 306 fun! s:ReadFile( dir, filename) fun! s:ReadFile( dir, filename)
307 307 let realdir= s:CheckDirForFile( a:dir, a:filename ) let realdir= s:CheckDirForFile( a:dir, a:filename )
308 308 if realdir=='' | return '' | endif if realdir=='' | return '' | endif
309 " if has('dos16') || has('gui_win32s') || has('win16') || ha
310 if !has('unix') && !&shellslash && &shell !~ 'sh[a-z.]*$'
311 return system('type "'.fnamemodify(realdir,':gs?/?\\?.').a:filename.'"')
312 else
313 return system( 'cat "'.escape(realdir.a:filename,'\$*').'"' )
314 endif
309 return join(readfile(realdir.a:filename), '\n')
315 310 endfun endfun
316 311
317 312 " Define/undefine a ';' or ',' separated list " Define/undefine a ';' or ',' separated list
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotvim

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotvim

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master