All predicatesShow sourceshell.pl -- Elementary shell commands

This library provides some basic (POSIX) shell commands defined in Prolog, such as pwd and ls for situations where there is no shell available or the shell output cannot be captured.

Source shell
Execute an interactive shell. The following options are tried to find a suitable shell command:
  1. The Prolog flag shell
  2. The environment variable $SHELL
  3. The Prolog flag posix_shell
  4. The environment variable %comspec% (Windows only)
Errors
- existence_error(config, shell) if no suitable shell can be found.
Source cd
Source cd(Dir)
Change working directory
Source pushd
Source pushd(+Dir)
Source popd
Source dirs
Manage the directory stack:
Source pwd
Print current working directory
Source ls
Source ls(+Pattern)
Listing similar to Unix =ls -F=, flagging directories with =/=.
Source mv(+From, +To) is det
Move (Rename) a file. If To is a directory, From is moved into the directory. Uses expand_file_name/2 on the From argument.
Source rm(+File) is det
Remove (unlink) a file
Source name_to_file(+Name, -File)[private]
Convert Name into a single file.
Source warning(+Fmt, +Args:list) is det[private]
Source table(+List, +Width)//[private]
Produce a tabular layout to list all elements of List on lines with a maximum width of Width. Elements are placed as ls does:
1  4  7
2  5  8
3  6
Source file_style(++File, =Style) is det[multifile]
True when File should be listed as a terminal hyperlink. The default only links Prolog source files.
Arguments:
Style- is either url to make a hyperlink or a valid style argument for ansi_format/3.
Source table_layout(+Items, +PageWidth, -Layout:dict) is det[private]
Compute the number of columns, rows and the column width to create a tabular layout for Items.