Comments (11)
The above issue was modified slightly as I got to understand more precisely the condition under which I get a difference between the C readline and the ruby readline.
from rb-readline.
Hello,
Excuse my ignorance, but I seems not to understand what you're reporting here.
I've tried against examples/example_readline_with_completion.rb
and saw that no space is added after the completion is done.
That is what you're suggesting? That a space is added after a completion method is done?
Sorry I no longer have C Readline available to compare behaviors.
Please let me know.
from rb-readline.
If C Readline the prompt has a space added to the end.
In rb-readline there is no space added and I don't think the behavior is changed by setting Readline.completion_append_character to a space.
from rb-readline.
Sorry, but you lost me again. I'm not understanding if you're talking about the prompt, the autocomplete or what anymore.
from rb-readline.
Sorry. I didn't mean the prompt. I meant the Readline.line_buffer or the text that appears after the completion action is performed
Here are some examples assuming the definition of the completion function:
Readline.completion_proc=Proc.new{|args| [args]}
C Readline:
abc<TAB> becomes: abc<SPACE>
<TAB> becomes <SPACE>
abc<SPACE>def<TAB> becomes abc<SPACE>def<SPACE>
rb-readline:
abc<TAB> becomes: abc
<TAB> becomes nothing
abc<SPACE>def<TAB> becomes abc<SPACE>def
from rb-readline.
Thank you to explain the problem, I finally comprehend it.
I'll investigate later on this but indeed is an implementation mismatch.
from rb-readline.
I played around with this bug some weeks ago, but didn't get around to submitting a patch.
rocky: this isn't the correct solution, but just so that I'm understanding the problem correctly, does changing line 165 of lib/readline.rb to result.uniq
solve the problem for you?
Just to confuse matters a little more, the GNU Readline/standard Ruby Readline varies behaviour in this situation between 1.8.7 and 1.9.2. I can only reproduce the above situation on 1.8.7. Using 1.9.2, the behaviour is more like the current behaviour of rb-readline.
What sort of compatibility are we aiming for? Should rb-readline on 1.8.7 and 1.9.2 vary behaviour to match the corresponding version of Ruby & GNU/C Readline (yuck!)?
from rb-readline.
Hey guys, can you email me? let's have a email conversation about the project moving forward.
I really would like to introduce your changes, but also build a solid testing infrastructure.
Right now, it lacks it (unit tests are worthless). I was thinking do a childprocess driven specs or features for example, to avoid possible interference by console redirection, and also considering that Windows sucks at console redirection.
I can put the building blocks for it in a few weeks, but perhaps you guys can take a stab first.
Not only introduce the changes but have you both as contributors.
My email is my username at gmail.com
Thank you.
from rb-readline.
Pull request 45[1] should fix this issue.
Rocky, can you confirm that it works for your case, please?
1 - #45
from rb-readline.
I just tried it on the example above
abc<TAB> becomes: abc<SPACE>
<TAB> becomes <SPACE>
abc<SPACE>def<TAB> becomes abc<SPACE>def<SPACE>
and all of this checks out fine.
The problem originally came up in testing completion for the trepanning for rubinius, but I haven't tried it there.
from rb-readline.
Fixed by #45.
from rb-readline.
Related Issues (20)
- IRB and readline with non english keyboards on Windows HOT 1
- Alt+. crashes in `_extract_last_quote` when last line is empty
- Already initialized constant warnings under Ruby 2.3.1 HOT 4
- new release HOT 4
- VI in Rails Console HOT 2
- rb-readline (0.5.3) crashes on mac_os_x / 2.3.1p112 HOT 1
- "\r" being displayed after hitting enter in rb-readline on Arch HOT 2
- Invalid byte sequence in UTF-8 when running console HOT 5
- issue deploying rails 5 application to AWS using Elastic Beanstalk due to rb-readline HOT 5
- RbReadline.rl_insert_text can not insert Chinese characters
- Officially support JRuby HOT 2
- ArgumentError when case insensitive matching is active HOT 1
- Add support for Readline.vi_editing_mode? & Readline.emacs_editing_mode? HOT 1
- Tests are randomly failing
- Using rb-readline in Windows with cygwin/mintty/git for Windows doesn't work
- Rb-readline causes the rails console to use the keyboard "↑" after typing Chinese and cannot load Chinese
- Fails when $TERM=xterm HOT 4
- Broken support for special prefixes HOT 1
- `Readline::HISTORY.delete_at(index)` not working for indices of negative values
- Encoding::UndefinedConversionError for UTF-8 to ASCII8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rb-readline.