Skip to main content
Latest
function fn.systemlist
import { fn } from "https://deno.land/x/denops_lsputil@v0.9.4/deps.ts";
const { systemlist } = fn;

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[]>