Git Product home page Git Product logo

Comments (2)

andychu avatar andychu commented on July 23, 2024

Yes, this is a bug I just introduced in the process of making the AST more detailed. To convert osh to oil, I need to represent the different between $a and ${a}, which doesn't matter from an execution point of view. So the executor doesn't deal properly with $a (but I think ${a} should work).

After the AST is done evolving (based on three use cases I outlined at the end of this post: http://www.oilshell.org/blog/2017/01/06.html ) I need to make another pass on the executor to fix up stuff like this.

Thanks for trying it!

from oil.

andychu avatar andychu commented on July 23, 2024

I fixed this with commit cb22624. That fixed the way we processed $a and ${a} -- i.e. the difference introduced by the Lossless Syntax Tree.

Now it complains about not having one argument, which isn't right either, but we're making progress :)

If you are interested in helping let me know, or subscribe to oil-dev: http://lists.oilshell.org/private.cgi/oil-dev-oilshell.org/2017-March/thread.html

$ bin/osh
osh$ $a
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 278, in OshMain
    InteractiveLoop(opts, ex, c_parser, w_parser, line_reader)
  File "bin/osh", line 100, in InteractiveLoop
    status, cflow = ex.ExecuteTop(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 866, in ExecuteTop
    status, cflow = self.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 852, in Execute
    status, cflow = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 661, in _Execute
    thunk = self._GetThunkForSimpleCommand(argv, more_env)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 503, in _GetThunkForSimpleCommand
    assert argv, "Need at least one arugment"
AssertionError: Need at least one arugment

from oil.

Related Issues (20)

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.