package opam_bin_lib
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
The opam-bin tool is a simple framework to use `opam` with binary packages
Install
dune-project
Dependency
ocamlpro.github.io
Readme
Changelog
LGPL-2.1-only WITH OCaml-LGPL-linking-exception License
Edit opam file
Versions (5)
Authors
Maintainers
Sources
v1.2.0.tar.gz
sha256=1d061f53870a3212133c6713207e040fca9c76a1b81696049599f1a84b44e76c
doc/src/opam_bin_lib/commandSearch.ml.html
Source file commandSearch.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82(**************************************************************************) (* *) (* Copyright 2020 OCamlPro & Origin Labs *) (* *) (* All rights reserved. This file is distributed under the terms of the *) (* GNU Lesser General Public License version 2.1, with the special *) (* exception on linking described in the file LICENSE. *) (* *) (**************************************************************************) open EzCompat open Ezcmd.TYPES open Ez_file.V1 open EzFile.OP (* open EzConfig.OP open OpamParserTypes *) let cmd_name = "search" let iter f = let tested_set = ref StringSet.empty in Misc.iter_repos ~cont:ignore ( Misc.all_repos () ) (fun ~repo ~package ~version -> (* Misc.global_log "searching %s" version; *) if StringSet.mem version !tested_set then false else let file = ( repo // "packages" // package // version // "files" // Globals.package_info ) in tested_set := StringSet.add version !tested_set ; (* Printf.eprintf " Searching %s\n%!" file ; *) try if Sys.file_exists file then EzFile.iter_lines (fun line -> if f line then Printf.printf "%s:%s\n%!" version line ) file ; false with exn -> Printf.eprintf "warning: exception %s while searching %s\n%!" (Printexc.to_string exn) file; false ) let action ~i ?anon_arg () = let find_regexp core = let core = if i then Re.no_case core else core in let re = Re.compile core in iter (fun line -> Re.execp re line ) in match anon_arg with | None -> () | Some s -> find_regexp ( Re.str s ) let cmd = let anon_arg = ref None in let i = ref false in Arg.{ cmd_name ; cmd_action = (fun () -> action ~i:!i ?anon_arg:!anon_arg ()) ; cmd_args = [ ["i"], Arg.Set i, Ezcmd.info "Case-insensitive matching" ; [], Anon (0, fun s -> anon_arg := Some s), Ezcmd.info "Search string" ; ]; cmd_man = []; cmd_doc = "Search binary packages"; }
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>