Skip to content

Commit

Permalink
ADDED: swipl pack info: --dir=DIR option
Browse files Browse the repository at this point in the history
Give info on packs installed below DIR
  • Loading branch information
JanWielemaker committed Dec 23, 2024
1 parent 5ee1ee7 commit 96e2a9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/pack.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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(_, _) =>
Expand Down

0 comments on commit 96e2a9e

Please sign in to comment.