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

Copy&Paste code with TAB symbol inserts source into the code which makes it void value expression #382

Closed
vimutter opened this issue Jul 25, 2022 · 1 comment

Comments

@vimutter
Copy link

Description

IRB Copy&Pasting code with TAB symbol inserts source into the code which makes it void value expression.

Essentially if you want to quick test run some code from editor which contains TAB, code inserted gets altered which makes it invalid.

Test code

def test
  loop do
  	break # Here is <space><space><tab>break
  end
end

If you paste it gets entered as:

def test
  loop do
source break 
  end
end

Result of irb_info

Ruby version: 3.1.1
IRB version: irb 1.4.1 (2021-12-25)
InputMethod: ReidlineInputMethod with Reline 0.3.0
.irbrc path: /home/user/.rvm/rubies/ruby-3.1.1/.irbrc
RUBY_PLATFORM: x86_64-linux
LANG env: C.UTF-8
East Asian Ambiguous Width: 1
@tompng
Copy link
Member

tompng commented Aug 14, 2024

IRB 1.11.1 #832 fixed not to autocomplete on the beginning of the line.
Reline 0.5.6 ruby/reline#655 supported bracketed paste. Reline will insert TAB character(if terminal emulator supports bracketed paste feature).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants