I have looked around, can not find anyway to use fzf to search history in irb or pry console. Is there any way make it?
How make `reverse-i-search` history use fzf in irb or pry console
1.1k views Asked by Fangxing At
1
There are 1 answers
Related Questions in IRB
- How to get the path of a file without normalisation in ruby?
- Stop Rails IRB and debugger sharing history
- ruby `pry`: can I edit classes defined on the REPL?
- Why Visual studio don't give me an output?
- Prevent Rails console from removing consecutive linebreaks
- IRB Keyboard Shortcuts are disabled? Can these be re-enabled? What did I break?
- How can remove multiline output with Rails console (Rails 6.1.7.2/Ruby 3.1.2)?
- Rails 7 IRB console inserts escape key instead of execute delete command
- What is the traceback/local jumpback error in irb repl when writing multiline code?
- Rails console overriding `~/.irbrc`
- Ruby on Rails undefined local variable or method in console
- adding search function to my rails API (with pg_search), model comming from external DB, getting Object doesnt support #inspect
- Ruby 3 IRB home end and ctrl-u not working
- No history for rails console
- How to copy object from one shell to another shell?
Related Questions in PRY
- ruby `pry`: can I edit classes defined on the REPL?
- Can't install new theme of pry-theme
- Unable to trap INT/TERM signals in nested Ruby processes
- How do I use pry in bin/console in a Ruby project
- Re-enable binding.pry after calling disable-pry
- Unexplained pry behavior in Ruby
- binding.pry not works with command bin/dev
- How to disable Pry autocomplete?
- Rspec test to request controller action but seems action wasn't executed
- How do I get show-doc to work with pry for Ruby?
- How to debug inside a code block without skipping it
- How replicate rails console output style in runner script?
- How can I paste multiple line command with Docker interactive mode but not evaluating?
- Passing arguments while debugging
- Having problems using key arrows with pry in docker-compose
Related Questions in FZF
- How to open all folders in CWD as tmux windows
- fzf bash refresh / re expannd and substitute $() and `` var expansion with binding in --reload() option
- Xargs to cd for files with spaces on mac
- zsh keybind giving error it isn't a widget
- How do programs in unix know whether the input stream "is over"?
- How can I make fzf.vim split the window evenly when I use ctrl-x or ctrl-v?
- How to use rga (ripgrep-all) with fzf for searching the pdf file and then using sioyek to open that file with its page number?
- Alias a command in Windows Terminal using Powershell as the default profile
- ZSH automatically run commands after selecting FZF result
- process got suspened with using restic with fzf
- How to use ansi colors in fzf --header?
- Neovim: Moving selected text to another file selected by fzf
- fzf.vim - How to create git branch command with git log preview?
- fzf to return combination of input fields
- ag (the silver searcher) does not automatically search recursively
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
After a look around, I get it that command completion is associated with GNU Readline, and then I found a pure ruby implementation of Readline, in fact It's quite easy to make fzf works in pry with
RbReadline, what I have do is overwrite theRbReadline's class methodrl_reverse_search_history, which is triggered when we hit Ctrl + R in pry console.Summary of what I have done:
Install rb-readline
Modify your
.pryrcadd thisThe
rl_insert_textinserts the result you selected from fzf into the terminal after your cursor.