🚀 perf(fish): change logic of the repos command to just search in the repos folder with an exact depth without searching for a git folder

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
This commit is contained in:
Sergio Laín 2024-01-11 10:17:07 +01:00
parent d93654e4cd
commit 6f4527d15d
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -1,6 +1,7 @@
function repos --description 'Open Git directories in ~/Repos with fzf in a new Kitty tab' 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 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" if test -n "$selected_dir"
set tab_title (basename "$selected_dir") set tab_title (basename "$selected_dir")