Commits

ZyX_I  committed 48d52ea

@/os: Made s:F.run() use “silent! !” only

  • Participants
  • Parent commits 2accded

Comments (0)

Files changed (1)

File plugin/frawor/os.vim

         \}
 function s:F.run(cmd, ...)
     try
-        let hasnls=(stridx(a:cmd, "\n")!=-1)
-        if hasnls
-            let savedopts={}
-            for [opt, val] in items(s:opts)
-                let savedopts[opt]=eval('&g:'.opt)
-                execute 'let &g:'.opt.'=val'
-            endfor
-        endif
+        let savedopts={}
+        for [opt, val] in items(s:opts)
+            let savedopts[opt]=eval('&g:'.opt)
+            execute 'let &g:'.opt.'=val'
+        endfor
         if a:0
             if !s:os.chdir(a:1)
                 return -1
             endif
         endif
-        if hasnls
-            execute 'silent! !'.a:cmd
-        else
-            call system(a:cmd)
-        endif
+        execute 'silent! !'.a:cmd
         return v:shell_error
     finally
         if a:0