DEV Community

Discussion on: Create an Interactive Bash Command for searching and checking out Git Branches on the Terminal using fzf

Collapse
 
aalises profile image
Albert Alises • Edited

Thanks for the words!!

The command for ls contained a typo. For the preview to work, you need to pass the path to bat using {}, that is: --preview 'bat --style=numbers --color=always {}'.

I have updated the command in the article, thanks for noticing!

As for the navigation, I guess you could trigger the command recursively when clicking on the right arrow, with the new path, and abort the current command. Clicking the left arrow would trigger ls .., hit me up if you manage to get it working!