From f862378fac86143d091aab0c31781acc43be1bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 10 Dec 2023 13:30:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(fish):=20repos=20?= =?UTF-8?q?function=20now=20shows=20a=20preview=20with=20fzf=20before=20yo?= =?UTF-8?q?u=20choose=20a=20repo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/fish/functions/repos.fish | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/fish/functions/repos.fish b/.config/fish/functions/repos.fish index 931d297d..f7e85ef2 100644 --- a/.config/fish/functions/repos.fish +++ b/.config/fish/functions/repos.fish @@ -1,9 +1,10 @@ function repos --description 'Open Git directories in ~/Repos with fzf in a new Kitty tab' - set selected_dir (find ~/Repos -type d -exec test -e '{}/.git' ';' -print -prune | fzf) + set gfetch "gfetch -d churn contributors --no-color-palette --no-title" + set selected_dir (find ~/Repos -type d -exec test -e '{}/.git' ';' -print -prune | 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") - set new_tab_cmd "kitty @ set-tab-title \"$tab_title\"; and cd $selected_dir; and onefetch; and lh" + set new_tab_cmd "kitty @ set-tab-title \"$tab_title\"; and cd $selected_dir; and $gfetch; and l" eval $new_tab_cmd end