⚙️ config(fish): repos function checks subdirectories only in a maxdepth of 1

This commit is contained in:
Sergio Laín 2024-08-04 13:25:17 +02:00
parent cc5a77f6b0
commit 87fecb23f0
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150

View file

@ -1,6 +1,6 @@
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 1 -maxdepth 1 -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" if test -n "$selected_dir"
set tab_title (basename "$selected_dir") set tab_title (basename "$selected_dir")