Environment variables
module Env : sig ... end
Environment variables.
val envs : unit -> Cmdliner.Term.env_info list
envs ()
describe the VISUAL
and EDITOR
environment variables.
Editing
val find : ?search:B00_std.Fpath.t list -> unit -> (B00_std.Cmd.t option, string) Stdlib.result
find ?search ()
finds a suitable editor. This is (in order):
Ok (Some pager)
ifpager
is a tool invocation parsed from theVISUAL
environment variable that can be found viaOs.Cmd.find ?search
.Ok (Some pager)
ifpager
is a tool invocation parsed from theEDITOR
environment variable that can be found viaOs.Cmd.find ?search
.Ok (Some pager)
ifnano
can be found viaOs.Cmd.find ?search
.Ok None
otherwise.
val edit_files : B00_std.Cmd.t option -> B00_std.Fpath.t list -> (B00_std.Os.Cmd.status, string) Stdlib.result
edit-files editor fs
uses editor
to edit the files fs
. If editor
is:
None
, an error message is returned mentioning that no editor was found.Some editor
invokes the command with filesfs
and returns the exit status of the program.