• mbw@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    If you have fzf installed, it is easy to integrate it with your bash history. In my .bashrc, I have:

    # Introduce fzf-driven functionality as described here: https://wiki.archlinux.org/title/fzf.
    source /usr/share/fzf/key-bindings.bash
    source /usr/share/fzf/completion.bash
    

    Also, you may be interested in zoxide, which keeps track of paths you have navigated to. Also from my .bashrc:

    # Enable an autojump-like 'j' command. Use 'ji M' to select paths starting with M using fzf.
    # This needs to always come last.
    eval "$(zoxide init --cmd j bash)"
    
    • dave@hal9000@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      I just started using both recently and it’s great. For the fzf file search, there’s even some extension that can show a preview pane of text files and even images!