Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.1 KB

File metadata and controls

65 lines (42 loc) · 1.1 KB

shell

Summary

Shell path resolution, alias management, and argument parsing helpers.

Availability

  • Repository: opencomputers
  • System: openos
  • Type: library

Source

  • OpenComputers/src\main\resources\assets\opencomputers\loot\openos\lib\core\full_shell.lua

Usage

local shell = require("shell")

API

shell.aliases()

  • Description: Iterate the alias table for the current process.
shell.aliases()

shell.execute(command, env, ...)

  • Description: Run a command string through the configured shell entry point and return the child result.
  • Parameters:
    • command
    • env
    • ...
shell.execute(nil, nil, nil)

shell.getPath()

  • Description: Return the current PATH environment variable.
shell.getPath()

shell.setPath(value)

  • Description: Replace the current PATH environment variable.
  • Parameters:
    • value
shell.setPath(nil)

Notes

  • OpenOS exposes a small bootstrap shell API first, then delays additional helpers such as command execution and PATH access until the full module is loaded.