From e75663c8466f9a11c402eca572b6acd5170ed546 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Tue, 30 May 2023 09:37:24 +0200 Subject: [PATCH] Add find-dir script --- bin/find-dir | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bin/find-dir diff --git a/bin/find-dir b/bin/find-dir new file mode 100755 index 0000000..6fcf5dc --- /dev/null +++ b/bin/find-dir @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -e "$1" ] +then + root=$1 + shift 1 +else + root=$(pwd) +fi + +if [ -n "$*" ] +then find "$root" -maxdepth 1 -type d | fzf -q "$*" +else find "$root" -maxdepth 1 -type d | fzf +fi