You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
>>> include_once 'foo.php'
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:
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...
Note that readline by default also inserts a space after whatever it autocompletes. There is currently no support for changing rl_completion_append_character which would allow psysh to prevent this from occurring at all. I have an open PR in php-src that fixes this: php/php-src#2720
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: