https://github.com/tompng/katakata_irb
IRB with Typed Completion
https://github.com/tompng/katakata_irb
Last synced: 8 days ago
JSON representation
IRB with Typed Completion
- Host: GitHub
- URL: https://github.com/tompng/katakata_irb
- Owner: tompng
- License: mit
- Created: 2022-10-30T15:57:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-24T18:05:37.000Z (over 1 year ago)
- Last Synced: 2025-03-31T14:14:13.827Z (15 days ago)
- Language: Ruby
- Homepage:
- Size: 471 KB
- Stars: 94
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- stars - tompng/katakata_irb - IRB with Typed Completion (Ruby)
README
# Important: Switch to gem repl_type_completor
IRB now supports type based completion with [ruby/repl_type_completor](https://github.com/ruby/repl_type_completor/).See [IRB's README](https://github.com/ruby/irb?tab=readme-ov-file#type-based-completion) for more information.
# KatakataIrb: IRB with Kata(型 Type) completion
KatakataIrb might provide a better autocompletion based on type analysis to irb.
## Installation
```
gem install katakata_irb
```
## UsageJust require katakata_irb or write it to your `.irbrc` file.
```ruby
# .irbrc
require 'katakata_irb' rescue nil
``````
irb(main):001:0> require 'katakata_irb'
=> true
irb(main):002:0> [1,'a'].sample.a█
|[1,'a'].sample.abs |
|[1,'a'].sample.abs2 |
|[1,'a'].sample.allbits? |
|[1,'a'].sample.angle |
|[1,'a'].sample.anybits? |
|[1,'a'].sample.arg |
|[1,'a'].sample.ascii_only?|
``````
irb(main):001:0> require 'katakata_irb'
=> true
irb(main):002:0> a = 10
=> 10
irb(main):003:1* if true
irb(main):004:2* b = a.times.map do
irb(main):005:2* _1.to_s
irb(main):006:1* end
irb(main):007:1* b[0].a█
|b[0].ascii_only?|
```