import { type tabtab } from "https://deno.land/x/tabtab@0.2.2/mod.ts";
const { Env } = tabtab;
Public: Main utility to extract information from command line arguments and Environment variables, namely COMP args in "plumbing" mode.
options - The options hash as parsed by minimist, plus an env property representing user environment (default: { env: process.env }) :_ - The arguments Array parsed by minimist (positional arguments) :env - The environment Object that holds COMP args (default: process.env)
Examples
const env = tabtab.parseEnv(); // env: // complete A Boolean indicating whether we act in "plumbing mode" or not // words The Number of words in the completed line // point A Number indicating cursor position // line The String input line // partial The String part of line preceding cursor position // last The last String word of the line // lastPartial The last word String of partial // prev The String word preceding last