Andy Chu
Andy Chu Catch exceptions from completion hooks in the Executor.
Hook up dev.CrashDumper.  This is very rough now, but the basic flow
works.
Latest commit faaad11 Sep 17, 2018
Permalink
Failed to load latest commit information.
Python-2.7.13 Remove memoryview object from the build. Aug 19, 2018
asdl Fix another file descriptor bug by removing 'import cgi'. Sep 4, 2018
benchmarks OPy bytecode metrics and demo scripts. Sep 13, 2018
bin Catch exceptions from completion hooks in the Executor. Sep 17, 2018
build More bytecode metrics wtih R. Sep 13, 2018
core Catch exceptions from completion hooks in the Executor. Sep 17, 2018
demo Mark the readlink gold test as one that is passing. Jun 15, 2018
devtools Several minor tweaks to the metrics. Sep 13, 2018
doc Enhance runtime error messages based on running git-completion.bash. Sep 16, 2018
gold Addressing 0.6.pre4 release issues. Sep 7, 2018
native Show regex parse error messages from libc.c. Sep 2, 2018
oil Copy from sketch repo. This passes: Nov 16, 2016
opy Implement 'complete -F' syntax, and start the comp_builtins.py file. Sep 14, 2018
osh Enhance runtime error messages based on running git-completion.bash. Sep 16, 2018
ovm Fix a compile error. Jun 28, 2018
scripts A few more things Sep 15, 2018
spec Add a proper parse error for 'a[0]=1 ls' Sep 16, 2018
test Fix off-by-one line number. Sep 16, 2018
testdata Remove the zsh code that doesn't parse with OSH! Aug 30, 2018
tools [osh2oil] Don't crash on LhsIndexedName. Sep 16, 2018
web Remove trailiing whitespace from *.py and *.c files (#166) Aug 10, 2018
.gitignore Make 'git status' clean. Apr 24, 2018
.travis.yml A couple tweaks to the Travis test run. Feb 23, 2018
INSTALL.txt Bump version to 0.6.pre4. Sep 6, 2018
LICENSE.txt Give INSTALL and LICENSE a .txt extension. Aug 8, 2017
Makefile Start analyzing OPy compiler output with R. Sep 10, 2018
README.md README: change oil-dev@ to #oil-dev on Zulip. Apr 26, 2018
Vagrantfile Add FreeBSD and ubuntu32 Vagrant images. Sep 8, 2017
__init__.py Start integrating ASDL into the codebase. Dec 17, 2016
configure A release tarball built on Linux now compiles on OS X (#127) Jun 1, 2018
install Rename the oilc command to oshc. Mar 4, 2018
oil-version.txt Bump version to 0.6.pre4. Sep 6, 2018
portable-rules.mk Start analyzing OPy compiler output with R. Sep 10, 2018

README.md

Oil

Build Status

Oil is a new Unix shell. Why Create a New Unix Shell?

This repo contains a bash-compatible shell called OSH, written in Python.

The dialect of bash that is recognized is called the OSH language. The main goal now is to design the Oil language, which shell scripts can be automatically converted to.

Oil is written in Python, but we deploy a native executable. A subset of the Python-2.7.13/ directory is packaged with the application.

Try it

Clone the repo, build the Python extension, and run bin/osh. Basic things like pipelines, variables, functions, etc. should work.

bash$ build/dev.sh minimal
...
# Now you should have a libc.so symlink in the repository root directory

bash$ bin/osh
osh$ name=world
osh$ echo "hello $name"
hello world

You can also download the latest release and build it, which is linked from the home page.

Contributing

For information on how to build and test Oil, see Contributing on the wiki.

If you'd like to contribute, please post a message on the #oil-dev channel of oilshell.zulipchat.com. Let us know what you're thinking, or let us know if you're having problems getting started.

The blog has updates on the project status.

Code Overview

Try this to show a summary of what's in the repo and their line counts:

$ scripts/count.sh all

(Other functions in this file may be useful as well.)

Directory Structure

# Development Scripts

benchmarks/       # Test for speed
build/            # Build automation
  dev.sh          # For development builds, running CPython
test/             # Test automation
  unit.sh         ## Types of test runner: unit, spec, wild, smoke
  spec.sh
  wild.sh
  smoke.sh
  sh_spec.py      # shell spec test framework
spec/             # spec test cases
  bin/            # tools used in many spec tests
  testdata/       # scripts for specific test cases
  errors/         # TODO: migrate these bad shell scripts
scripts/          # Other development scripts
web/              # HTML/JS/CSS for tests and tools

# Oil Code

Python-2.7.13/    # CPython is the initial basis for the Oil VM
asdl/             # ASDL implementation
bin/              # programs to run (bin/osh)
core/             # the implementation (AST, runtime, etc.)
native/           # Native code for Oil, e.g. libc.c
osh/              # osh front end
oil/              # oil front end (empty now)
opy/              # Python compiler in Python
tools/            # osh2oil translator

# Temporary Directories

_bin/             # Native executables are put here
_build/           # Temporary build files
_devbuild/        # Developer build files not deleted upon 'make clean'
  gen/            # Generated Python and C code
_deps/            # build dependencies like re2c
_tmp/             # Test suites and other temp files
  spec/
  wild/
    raw/
    www/
  osh-parser/
  osh-runtime/
  vm-baseline/
  oheap/
  startup/
  ...
_release/         # Source release tarballs are put here
  VERSION/        # Published at oilshell.org/release/$VERSION/
    benchmarks/
    doc/
    metrics/
    test/
      spec.wwz
      wild.wwz
      ...
    web/          # Static files, copy of $REPO_ROOT/web
      table/


# Dev Docs

README.md

# End user docs

LICENSE.txt
INSTALL.txt

# End user build system

Makefile
configure
install

Unit tests are named foo_test.py and live next to foo.py.

More info

Right now we're using /r/oilshell on Reddit for general discussion.

I have docs that need to be cleaned up and published. For now, there is a fair amount of design information on the blog at oilshell.org.