Git Product home page Git Product logo

harlowja / oil Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oils-for-unix/oils

0.0 0.0 0.0 13.92 MB

Oil shell

Home Page: http://www.oilshell.org/

License: Apache License 2.0

Makefile 0.46% C 37.56% C++ 0.64% Python 55.62% Shell 1.80% Batchfile 0.01% HTML 0.40% Roff 0.55% Visual Basic 0.01% PLSQL 0.06% M4 0.53% Assembly 1.47% TeX 0.80% DIGITAL Command Language 0.07% Objective-C 0.02% CSS 0.01% JavaScript 0.01%

oil's Introduction

Oil

Oil is a new Unix shell, still in its early stages.

This repo contains a prototype in Python of a very complete bash parser, along with a runtime that is less complete.

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.

The code is 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/pylibc.sh build
...
# 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

Contributing

If you want to contribute, e-mail [email protected].

The blog has some general updates on the project status.

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

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
  pylibc.sh       # For developers to build the Python extension
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
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

# Temporary Directories

_bin/             # Native executables are put here
_release/         # Source release tarballs are put here
_build/           # Temporary build files
_tmp/             # Temporary test files and the like

# Dev Docs

README.md

# End user docs
LICENSE
INSTALL

# 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.

oil's People

Contributors

yumaikas avatar fauxfaux avatar andychu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.