B00_editor
Editor interaction.
module Env : sig ... end
Environment variables.
val envs : unit -> Cmdliner.Term.env_info list
envs ()
describe the VISUAL
and EDITOR
environment variables.
val find : ?win_exe:bool -> ?search:B00_std.Fpath.t list -> unit -> (B00_std.Cmd.t option, string) result
find ?win_exe ?search ()
finds a suitable editor. This is (in order):
Ok (Some pager)
if pager
is a tool invocation parsed from the VISUAL
environment variable that can be found via Os.Cmd.find ?search
.Ok (Some pager)
if pager
is a tool invocation parsed from the EDITOR
environment variable that can be found via Os.Cmd.find ?win_exe ?search
.Ok (Some pager)
if nano
can be found via Os.Cmd.find ?win_exe
?search
.Ok None
otherwise.val edit_files : B00_std.Cmd.t option -> B00_std.Fpath.t list -> (B00_std.Os.Cmd.status, string) 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 files fs
and returns the exit status of the program.