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.
 shell shell
- Execute an interactive shell. The following options are tried to
find a suitable shell command:
- The Prolog flag shell
- The environment variable $SHELL
- The Prolog flag posix_shell
- The environment variable %comspec%(Windows only)
 
- Errors
- - existence_error(config, shell)if no suitable shell can be
found.
 
 cd cd
 cd(Dir) cd(Dir)
- Change working directory
 pushd pushd
 pushd(+Dir) pushd(+Dir)
 popd popd
 dirs dirs
- Manage the directory stack:
- pushd/1 is as cd/1, pushing th old directory on a stack
- pushd/0 swaps the current directory with the top of the
stack
- popd/0 pops to the top of the stack
- dirs/0 lists the current directory and the stack.
 
 pwd pwd
- Print current working directory
 ls ls
 ls(+Pattern) ls(+Pattern)
- Listing similar to Unix =ls -F=, flagging directories with =/=.
 mv(+From, +To) is det 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.
 rm(+File) is det rm(+File) is det
- Remove (unlink) a file
 name_to_file(+Name, -File)[private] name_to_file(+Name, -File)[private]
- Convert Name into a single file.
 warning(+Fmt, +Args:list) is det[private] warning(+Fmt, +Args:list) is det[private]
 table(+List, +Width)//[private] 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 lsdoes:
1  4  7
2  5  8
3  6 
 file_style(++File, =Style) is det[multifile] 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 urlto make a hyperlink or a valid
style argument for ansi_format/3. |  
 
 
 table_layout(+Items, +PageWidth, -Layout:dict) is det[private] 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.
Re-exported predicates
The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
 cd cd
 cd(Dir) cd(Dir)
- Change working directory
 pushd pushd
 pushd(+Dir) pushd(+Dir)
 popd popd
 dirs dirs
- Manage the directory stack:
- pushd/1 is as cd/1, pushing th old directory on a stack
- pushd/0 swaps the current directory with the top of the
stack
- popd/0 pops to the top of the stack
- dirs/0 lists the current directory and the stack.
 
 pushd pushd
 pushd(+Dir) pushd(+Dir)
 popd popd
 dirs dirs
- Manage the directory stack:
- pushd/1 is as cd/1, pushing th old directory on a stack
- pushd/0 swaps the current directory with the top of the
stack
- popd/0 pops to the top of the stack
- dirs/0 lists the current directory and the stack.
 
 pushd pushd
 pushd(+Dir) pushd(+Dir)
 popd popd
 dirs dirs
- Manage the directory stack:
- pushd/1 is as cd/1, pushing th old directory on a stack
- pushd/0 swaps the current directory with the top of the
stack
- popd/0 pops to the top of the stack
- dirs/0 lists the current directory and the stack.
 
 ls ls
 ls(+Pattern) ls(+Pattern)
- Listing similar to Unix =ls -F=, flagging directories with =/=.