fzf icon indicating copy to clipboard operation
fzf copied to clipboard

Does it support using fzf inside lldb debugger for searching command history

Open dacheng-gao opened this issue 1 year ago • 1 comments

Checklist

  • [X] I have read through the manual page (man fzf)
  • [X] I have searched through the existing issues
  • [ ] For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.52.1 (brew)

OS

  • [ ] Linux
  • [X] macOS
  • [ ] Windows
  • [ ] Etc.

Shell

  • [ ] bash
  • [X] zsh
  • [ ] fish

Problem / Steps to reproduce

It would be great to add support for using fzf inside lldb.

dacheng-gao avatar May 25 '24 16:05 dacheng-gao

It appears that there is currently no project for lldb, someone started such a project for gdb.


EDIT1: Open issue for llvm/llvm-project

LangLangBart avatar May 25 '24 17:05 LangLangBart

https://github.com/llvm/llvm-project/pull/128571 is done.

But how can we use it?

Download the python script from https://github.com/llvm/llvm-project/blob/main/lldb/examples/python/fzf_history.py and save to e.g. ~/.lldb/python/fzf_history.py.

Edit ~/.lldbinit by adding below:

command script import ~/.lldb/python/fzf_history.py

Type fzf_history and hit Enter inside lldb session:

(lldb) fzf_history<Enter>

Enjoy fzf.

dacheng-gao avatar Mar 26 '25 02:03 dacheng-gao

Now it's working, I think we can close it.

dacheng-gao avatar Mar 26 '25 05:03 dacheng-gao