From 6f4527d15df1ad27d9ff3852662dee6bd36fbf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Thu, 11 Jan 2024 10:17:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20perf(fish):=20change=20logic=20o?= =?UTF-8?q?f=20the=20repos=20command=20to=20just=20search=20in=20the=20rep?= =?UTF-8?q?os=20folder=20with=20an=20exact=20depth=20without=20searching?= =?UTF-8?q?=20for=20a=20git=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as I always have repos, i dont have to worry about it, but if you do, make sure to uncomment the line of the previous command and comment this new one --- .config/fish/functions/repos.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/fish/functions/repos.fish b/.config/fish/functions/repos.fish index d2c3e49a..d6c3a855 100644 --- a/.config/fish/functions/repos.fish +++ b/.config/fish/functions/repos.fish @@ -1,6 +1,7 @@ function repos --description 'Open Git directories in ~/Repos with fzf in a new Kitty tab' set gfetch "gfetch -d churn contributors --no-color-palette --no-title" - set selected_dir (find ~/Repos -mindepth 2 -maxdepth 2 -type d -exec test -e '{}/.git' ';' -print -prune | fzf --preview "$gfetch {} && eza --long --header --icons --all --color=always --group-directories-first --hyperlink {}") + # set selected_dir (find ~/Repos -mindepth 2 -maxdepth 2 -type d -exec test -e '{}/.git' ';' -print -prune | fzf --preview "$gfetch {} && eza --long --header --icons --all --color=always --group-directories-first --hyperlink {}") + set selected_dir (fd --exact-depth 2 . ~/Repos/ | fzf --preview "$gfetch {} && eza --long --header --icons --all --color=always --group-directories-first --hyperlink {}") if test -n "$selected_dir" set tab_title (basename "$selected_dir")