Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tab completion doesn't work on OS X #228

Open
andychu opened this issue Feb 9, 2019 · 2 comments
Open

tab completion doesn't work on OS X #228

andychu opened this issue Feb 9, 2019 · 2 comments

Comments

@andychu
Copy link
Contributor

andychu commented Feb 9, 2019

I just tried 0.6.pre14 on OS X and the tab completion is funny.

This is likely a combination of 2 factors:

  • I copied a bunch of readline #defines from pyport.h into Modules/readline.c. Python's autotools ./configure detects some readline features, but ours doesn't. And they are likely different on OS X.
  • OS X uses libedit, not GNU readline (I think)

TODO: Get a copy of Python's pyconfig.h on OS X? Is it always the same?

@andychu
Copy link
Contributor Author

andychu commented Feb 9, 2019

I tried copying #defines from pyconfig.h on OS X into Modules/readline.c, but it didn't work. Tab just displays tabs.

It would be interesting to know if the dev build of Oil works on OS X, using their own readline module.

I would like some help with this issue, but be warned that the way I modified the CPython build is pretty weird.

@andychu
Copy link
Contributor Author

andychu commented Feb 9, 2019

Hm the standalone demoish.py doensn't work on my Mac either (running under its own Python 2.7.10 build). Hitting tabs shows tabs rather than performing completion.

https://github.com/oilshell/blog-code/tree/master/interactive-shell

andychu pushed a commit that referenced this issue Feb 20, 2019
This will aid in correct history expansion (#231) as well as completion
on OS X (#228).

Tested:

- dev build with line_input.so
- Building _bin/oil.ovm{,-dbg} in the repo
- tarball build on my machine (build/test.sh)
- tarball build in Alpine Linux, without readline (test/alpine.sh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant