From 010035f8529eb9da3083cd6b150f51374aec7716 Mon Sep 17 00:00:00 2001 From: Robbie Smith Date: Tue, 11 Apr 2017 20:55:54 -0600 Subject: [PATCH] This adds an alternate fd-cd example. The functionality is the same, it just limits the directories shown by not including the sub-directories. --- Examples.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Examples.md b/Examples.md index 985eb0e..7f44e4e 100644 --- a/Examples.md +++ b/Examples.md @@ -94,6 +94,16 @@ fd() { } ``` +```sh +# Another fd - cd into the selected directory +# This one differs from the above, by only showing the sub directories and not + showing the directories within those. +fd() { + DIR=`find * -maxdepth 0 -type d -print 2> /dev/null | fzf-tmux` \ + && cd "$DIR" +} +``` + ```sh # fda - including hidden directories fda() {