From 96e2a9eff7083847c674d24ad8a4f0778b9193d8 Mon Sep 17 00:00:00 2001 From: Jan Wielemaker Date: Mon, 23 Dec 2024 20:58:57 +0100 Subject: [PATCH] ADDED: swipl pack info: --dir=DIR option Give info on packs installed below DIR --- app/pack.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/pack.pl b/app/pack.pl index 177df06062..ced635adc9 100644 --- a/app/pack.pl +++ b/app/pack.pl @@ -91,7 +91,9 @@ pack_command(help, "Help on command (also swipl pack command -h)"). pack_find:opt_type(_,_,_) :- fail. -pack_info:opt_type(_,_,_) :- fail. + +pack_info:opt_type(dir, pack_directory, directory). +pack_infodlist:opt_help(pack_directory, "Pack directory"). pack_remove:opt_type(y, interactive, boolean(false)). pack_remove:opt_type(deps, dependencies, boolean). @@ -245,6 +247,10 @@ cli_pack_find(_, _) => argv_usage(pack_find:debug). +cli_pack_info(Pos, Options), + select_option(pack_directory(Dir), Options, Options1) => + attach_packs(Dir, [replace(true)]), + cli_pack_info(Pos, Options1). cli_pack_info([Pack], _) => cli(pack_info(Pack)). cli_pack_info(_, _) =>