From a3b636c0678922e1408a4c3b36b8babceac8c439 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Sat, 30 Jul 2022 13:15:30 +0200 Subject: [PATCH] feat(fzf): add new function to jump to directories --- zshrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zshrc b/zshrc index c3c5b4d..9050413 100644 --- a/zshrc +++ b/zshrc @@ -167,6 +167,17 @@ fo() { fi } +# fcd - cd into directory +fcd() { + cd $(find * -type d | fzf --preview 'tree -C {} | head -50') +} + +# fhcd – Jump to home directory and search for directories +fhcd() { + cd $HOME + cd $(find * -type d | fzf --preview 'tree -C {} | head -50') +} + # fdr - cd to selected parent directory fdr() { local declare dirs=()