Productive Terminal

Productive Terminal

FZF has truly transformed the way I interact with the command line. Give it a try, and you'll wonder how you ever lived without it!

What is FZF?

FZF is a versatile command-line tool that allows you to search and filter through lists of items with lightning speed. Whether you're looking for files, browsing command history, or selecting from a list of options, FZF makes the process effortless and intuitive.Like any other tool, the first step is installation. You can find installation instructions based on your operating system and preferred method at FZF's GitHub page.

5 Useful FZF Recipes

1. Quick File Opening

Quickly search for and open files in Vim or VS Code

alias vf='vim $(fzf)'  # For Vim users
alias cf='code $(fzf)' # For VS Code users        

2. Interactive Directory Navigation

Easily navigate to any subdirectory within your current location

alias cdf='cd $(find . -type d | fzf)'        

3. Git Branch Switching

Quickly switch between Git branches without typing long branch names

alias gbr='git checkout $(git branch | fzf)'        

4. Process Killing

Interactively select and terminate processes

alias fkill='kill -9 $(ps aux | fzf | awk "{print $2}")'        

5. Command History Search

Quickly find and re-run previous commands from your shell history. This is where I was introduced to FZF.

alias fh='eval $(history | fzf | cut -c 8-)'        

To store these aliases permanently, add them to your shell configuration file (e.g., .bashrc, .zshrc, or .bash_profile) depending on your shell. This way, they'll be available every time you open a new terminal session.


https://vitormv.github.io/fzf-themes/ provides a way to easily customize the theme of the FZF interface.

My personal setting :

export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border --color=bg+:#282a36,bg:#44475a,fg:#f8f8f2,prompt:#50fa7b,pointer:#ff79c6,marker:#ffb86c"        

These commands might not look intuitive at first, but once you start working with FZF, you'll be amazed and wonder why you never knew about it! There is a ton of potential in this tool, and I have yet to explore anything beyond these basics.

要查看或添加评论,请登录

Deepak Rout的更多文章

  • Custom Metadata in Delta Table History

    Custom Metadata in Delta Table History

    If you’ve ever lived in the pre-cloud ETL world, you’ll remember how ETL tools or stored procedures were the backbone…

    1 条评论
  • Do You Know What the RELY Option in a Primary Key Does on Databricks?

    Do You Know What the RELY Option in a Primary Key Does on Databricks?

    If you're working with Databricks SQL and want to supercharge your query performance, it's time to explore the RELY…

  • Be Careful with NULL Handling During Database Migrations

    Be Careful with NULL Handling During Database Migrations

    When migrating databases, especially when using window functions like ROW_NUMBER(), RANK(), or DENSE_RANK(), one subtle…

    1 条评论
  • YAML Engineers

    YAML Engineers

    In the data engineering field, YAML files have become a beloved tool, much like in DevOps. Over the years, data…

  • Lost in translation

    Lost in translation

    I was scrolling through my LinkedIn feed the other day when I stumbled upon this hilarious (and kinda sad) interaction.…

  • The Modern Alternative to Makefiles

    The Modern Alternative to Makefiles

    Have you ever stared at a Makefile, feeling lost in a sea of colons, tabs, and cryptic syntax? You're not alone. Many…

  • Where Is Everyone ?

    Where Is Everyone ?

    Ever sent out a status update, shared code for review, or posted in a team channel only to be met with..

  • SQL Productivity Hack

    SQL Productivity Hack

    As a data consultant, I often find myself writing SQL queries to move data between tables with some transformations…

    1 条评论
  • "ASOF JOIN: Bridging the Time Gap in Data Analysis"

    "ASOF JOIN: Bridging the Time Gap in Data Analysis"

    You must have been hearing more and more about a new type of JOIN called . Modern databases are adding this feature to…

  • Value-Focused Framework

    Value-Focused Framework

    As leaders in the digital age, we must look beyond technology and patterns to embrace a holistic view of architecture…

社区洞察

其他会员也浏览了