fish: insert project name in path for l2wt

This commit is contained in:
Primrose 2024-11-15 21:04:55 +01:00
parent dae28e7a69
commit 5ff891cb25
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 4 additions and 2 deletions

View file

@ -5,7 +5,9 @@ function l2wt \
echo "Path needed"
end
git worktree add "$WORKTREE_PATH/$argv[1]" $argv[2..]
set project_name (basename (git rev-parse --show-toplevel))
git worktree add "$WORKTREE_PATH/$project_name/$argv[1]" $argv[2..]
end
complete l2wt --no-files -a "(