package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

Dune Dependency

Authors

Maintainers

Sources

b0-0.0.4.tbz
sha512=665735c8b7a8674201be765bdd676a18d1e38eff35de9d44c3dc15e2bfed2247e8963c9a32ae62d9ca2d6cd1edebd849aac29fdd5a846c14a30feea3edfc0601

doc/b0_b00_kit/B00_editor/index.html

Module B00_editor

Editor interaction.

Environment variables

module Env : sig ... end

Environment variables.

val envs : unit -> Cmdliner.Cmd.Env.info list

envs () describe the VISUAL and EDITOR environment variables.

Editing

val find : ?win_exe:bool -> ?search:B00_std.Fpath.t list -> unit -> (B00_std.Cmd.t option, string) Stdlib.result

find ?win_exe ?search () finds a suitable editor. This is (in order):

  1. Ok (Some pager) if pager is a tool invocation parsed from the VISUAL environment variable that can be found via Os.Cmd.find ?search.
  2. 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.
  3. Ok (Some pager) if nano can be found via Os.Cmd.find ?win_exe ?search.
  4. 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 files fs and returns the exit status of the program.
OCaml

Innovation. Community. Security.