From db32c6ccce91e0b36873c8bfccd1e40f452a2060 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Tue, 4 Feb 2025 13:37:02 +0100 Subject: [PATCH] fix(mvn): handle directories in `` (#12957) --- plugins/mvn/mvn.plugin.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index a569a87fa..7bffce36e 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -101,8 +101,14 @@ function listMavenCompletions { new_file="../pom.xml" fi - # if file doesn't exist break file="${file:h}/${new_file}" + + # if the file points to a directory, assume it is a pom.xml in that directory + if [[ -d "$file" ]]; then + file="${file}/pom.xml" + fi + + # if file doesn't exist break if ! [[ -e "$file" ]]; then break fi