A.54 library(shell): Elementary shell commands
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(shell): Elementary shell commands
          • shell/0
          • shell_command/1
          • cd/0
          • cd/1
          • pushd/0
          • pushd/1
          • popd/0
          • dirs/0
          • pwd/0
          • ls/0
          • ls/1
          • mv/2
          • rm/1
          • file_style/2
          • cls/0
    • Packages
Availability::- use_module(library(shell)).(can be autoloaded)
Sourceshell_command(-Shell:atom)
True when Shell is the preferred executable for running an interactive shell. Used by shell/0. The following options are tried to find a suitable shell command:

  1. The Prolog flag shell
  2. The environment variable %comspec% (Windows only)
  3. The environment variable $SHELL
  4. The Prolog flag posix_shell
Errors
existence_error(config, shell) if no suitable shell can be found.