-
Notifications
You must be signed in to change notification settings - Fork 304
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
Change space addition behaviour while performing tab completions #346
Comments
Autocomplete in PsySH definitely inserts more spaces than it needs to, and I'd love to fix that. But in this case, I'm not able to replicate your exact issue locally...
completes to
… as does the double-quote version of the same. |
The PHP version that ships with Ubuntu uses libedit, and the issue definitely occurs there. Versions of PHP built on libreadline does not seem to have this issue. I tried installing the |
Note that readline by default also inserts a space after whatever it autocompletes. There is currently no support for changing As for switching your PHP to readline: Assuming you have the extension (readline.so) available, maybe make sure that it is also loaded in your php cli environment. Readline should have precedence over libedit in psysh, so if it is available I don't see why it wouldn't be using that. |
Spaces make a great deal of sense when autocompleting in a shell -- they help the user to understand whether the completion occured fully or partially.
However, this does not really make sense for PsySH, at least in certain circumstances. Say, you're trying to do something like:
When trying to autocomplete the
foo.php
file, it inserts a space, and now the user has to remove it and put in the quote for it to work.I'm not sure whether this behaviour can be even changed, because it seems tab completions are handled by libreadline/libedit. However, I'd like to see PsySH remove the addition of spaces, at least when autocompleting files.
The text was updated successfully, but these errors were encountered: