This repository has been archived on 2015-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
psh/main.py
2015-02-26 16:30:48 -05:00

25 lines
588 B
Python

import os
import os.path
from formatters import *
from raw_commands import RawCommand
# Load all of the commands in the path into the global namespace as raw
# commands.
for path in os.environ['PATH'].split(':'):
if os.path.exists(path):
binaries = os.listdir(path)
for binary in binaries:
if binary not in globals():
globals()[binary] = RawCommand(binary)
def main():
from console import HistoryConsole
console = HistoryConsole(globals())
console.interact("Augmented Unix Userland")
if __name__ == '__main__':
main()