Commit 1c7f60bb7003
Changed files (1)
home
modules
home/modules/lazyworktree.nix
@@ -81,7 +81,7 @@ in
description = ''
Directories to scan for automatic worktree alias discovery.
Key is the prefix (wt<prefix><repo>), value is the directory path.
- Repos with a 'main' subdirectory or .git are detected automatically.
+ Repos with .git are detected automatically.
'';
};
};
@@ -147,9 +147,7 @@ in
local selection
selection=\$(ls -1 \"$base_dir\" 2>/dev/null | fzf --prompt=\"$base_dir: \")
[[ -n \"\$selection\" ]] || return 1
- if [[ -d \"$base_dir/\$selection/main\" ]]; then
- worktree_jump \"$base_dir/\$selection/main\" \"\$@\"
- elif [[ -d \"$base_dir/\$selection/.git\" ]]; then
+ if [[ -d \"$base_dir/\$selection/.git\" ]]; then
worktree_jump \"$base_dir/\$selection\" \"\$@\"
else
echo \"Not a git repo: $base_dir/\$selection\" >&2
@@ -162,10 +160,8 @@ in
repo_name="$(basename "$repo_dir")"
target_dir=""
- # Determine target (main worktree or repo root)
- if [[ -d "$repo_dir/main" ]]; then
- target_dir="$repo_dir/main"
- elif [[ -d "$repo_dir/.git" ]]; then
+ # Determine target (repo with .git)
+ if [[ -d "$repo_dir/.git" ]]; then
target_dir="$repo_dir"
else
continue