Skip to main content
Module

x/denops_std/function/mod.ts>systemlist

📚 Standard module for denops.vim
Go to Latest
function systemlist
import { systemlist } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Same as system(), but returns a List with lines (parts of output separated by NL) with NULs transformed into NLs. Output is the same as readfile() will output with {binary} argument set to "b", except that there is no extra empty item when the result ends in a NL. Note that on MS-Windows you may get trailing CR characters.

To see the difference between "echo hello" and "echo -n hello" use system() and split():

echo system('echo hello')->split('\n', 1)

Returns an empty string on error.

Can also be used as a method:

:echo GetCmd()->systemlist()

Parameters

denops: Denops
expr: unknown
optional
input: unknown

Returns

Promise<unknown[]>