import { fieldFor } from "https://deno.land/x/pass_cli_wrapper@0.3.3/mod.ts";
Equivalent to retrieving the contents and looking for a line that starts with
${field}:
(the field
argument followed by a colon). The remainder
of the line (everything after the first colon) will be trimmed and returned.
For example, if you run pass google.com/personal
and get the following output:
hunter2
username: johnsmith
full_email:johnsmith@gmail.com
app_password: abcd 1234 efgh 5678
Then fieldFor("google.com/personal", "app_password")
would return abcd 1234 efgh 5678
.
If entry
does not exist, an EntryNotFoundError is thrown.
If field
cannot be found in the entry, a FieldNotFoundError is thrown.