Skip to content

Commit

Permalink
Upgrade reline to 0.4 and add custom color scheme to RubyShell
Browse files Browse the repository at this point in the history
  • Loading branch information
AI-Mozi committed Sep 3, 2024
1 parent bf38482 commit 7cf9054
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ and development.
## Requirements

* [Ruby] >= 3.0.0
* [reline] ~> 0.1
* [reline] ~> 0.4
* [command_kit] ~> 0.6
* [irb] ~> 1.0

Expand Down
2 changes: 1 addition & 1 deletion gemspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
required_ruby_version: ">= 3.0.0"

dependencies:
reline: ~> 0.1
reline: ~> 0.4
command_kit: ~> 0.6
irb: ~> 1.0

Expand Down
14 changes: 14 additions & 0 deletions lib/ronin/core/cli/ruby_shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def configure
IRB.conf[:IRB_NAME] = @name

set_prompt
set_completion_dialog
end

#
Expand Down Expand Up @@ -141,6 +142,19 @@ def set_prompt
end
end

#
# Sets colors for the tab-completion menu.
#
# @since 0.3.0
#
def set_completion_dialog
Reline::Face.config(:completion_dialog) do |conf|
conf.define :default, foreground: :white, background: :black
conf.define :enhanced, foreground: :black, background: :white
conf.define :scrollbar, foreground: :white, background: :black
end
end

end
end
end
Expand Down

0 comments on commit 7cf9054

Please sign in to comment.